> For the complete documentation index, see [llms.txt](https://takahitomiyamoto.gitbook.io/heroku-basic/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://takahitomiyamoto.gitbook.io/heroku-basic/toc/level-3/develop-heroku-applications.md).

# Salesforce に統合する Heroku アプリケーションの開発

Heroku Connect を利用した Salesforce から Heroku アプリへのデータ連携を試しましょう。

## 進め方

次のURLにアクセスし、「Trailhead Playground の起動とパッケージのインストール」を実施します。

> <https://trailhead.salesforce.com/ja/content/learn/projects/develop-heroku-applications/install-the-dreamhouse-app-and-create-a-heroku-button>

DreamHouse リポジトリをクローンし、VS Code で開きます。

{% tabs %}
{% tab title="Console" %}

```bash
git clone https://github.com/developerforce/intro-to-heroku.git
cd intro-to-heroku/
code .

```

{% endtab %}
{% endtabs %}

Procfileを作成して配置します。

{% tabs %}
{% tab title="Procfile" %}
{% code title="Procfile" %}

```
web: npm start

```

{% endcode %}
{% endtab %}
{% endtabs %}

Heroku アプリを作成し、簡単に動作確認します。

{% tabs %}
{% tab title="Console" %}

```bash
heroku create "好きな文字列"
heroku addons:create heroku-postgresql:hobby-dev -a "好きな文字列"

git add .
git commit -m "Lv.3-1 init"
git push heroku master

heroku open -a "好きな文字列"
```

{% endtab %}
{% endtabs %}

次のURLにアクセスし、「Heroku Connect の設定」を実施します。

> <https://trailhead.salesforce.com/ja/content/learn/projects/develop-heroku-applications/set-up-heroku-connect>

{% hint style="warning" %}
`dhdev-UNIQUE_ID` は作成した Heroku アプリの名前に読み替えてください。

> 新しい DreamHouse 開発アプリケーションである \[`dhdev-UNIQUE_ID`] をクリックします。
> {% endhint %}

{% hint style="warning" %}
認証情報（ユーザ名とパスワード）がわからない場合は、Trailhead Playground のアプリケーションランチャー > \[Playground Starter] > \[ログイン情報を取得する] でユーザ名を確認し、\[パスワードをリセットする] ボタンをクリックしてパスワードをリセットしてください。

> ステップ 1 でリセットした Trailhead の認証情報を使用して、アカウントを承認します。
> {% endhint %}

残りの単元は時間を見つけてやってみましょう。
