> 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-2/lwc-oss-recipes.md).

# LWC OSS Recipes

GitHubからクローンしてきたLWC OSSアプリをHerokuにデプロイしてみましょう。

## 進め方

次のURLにアクセスし、指示に従って進めてください。

> <https://trailhead.salesforce.com/ja/content/learn/projects/quick-start-explore-the-lightning-web-components-oss-recipes-sample-app>

{% hint style="danger" %}
Trailhead で `npm install` となっている箇所は、`yarn install` に読み替えてください。**npm** と **yarn** は併用することはできません。
{% endhint %}

## Herokuへのデプロイ

リポジトリ内にはすでにHeroku用の設定がなされているため、追加設定は不要でした。

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

```bash
heroku create "好きな文字列"

# ローカルで動作確認
npm run build:development
heroku local web

git push heroku main

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

```

{% endtab %}
{% endtabs %}

ローカルと同じ動作になってることを確認できたらOKです。
