LoginSignup
0
1

More than 3 years have passed since last update.

herokuでnodeアプリをデプロイする

Posted at

個人的な作業メモ。チュートリアルをなぞっただけです。

https://cli-assets.heroku.com/heroku.pkg からCLIのインストーラーをダウンロードして実行。

$ heroku --version
 ›   Warning: heroku update available from 7.35.0 to 7.39.5.
heroku/7.35.0 darwin-x64 node-v12.13.0

アップデートできるようなのでしおく。

$ heroku update
heroku: Updating CLI from 7.35.0 to 7.39.5... done
heroku: Updating CLI... done

herokuにログインする。

$ heroku login
heroku: Press any key to open up the browser to login or q to exit: 

何らかのキーを押すとブラウザが開く。

スクリーンショット 2020-04-29 9.18.38.png

Log Inを押下。CLIに戻るとログインされていた。すげぇ。

Logging in... done
Logged in as my@mail.address

サンプルのリポジトリをクローン。

git clone https://github.com/heroku/node-js-getting-started.git
cd node-js-getting-started

リモートと紐づける。

$ heroku create
Creating app... done, ⬢ morning-fortress-****
https://morning-fortress-****.herokuapp.com/ | https://git.heroku.com/morning-fortress-****.git
$ view ./.git/config 

[remote "heroku"]
        url = https://git.heroku.com/morning-fortress-****.git
        fetch = +refs/heads/*:refs/remotes/heroku/*

リモートにherokuが追加されている。

git push heroku master

herokuにプッシュする。

$ heroku open

を叩くとブラウザが起動した。

スクリーンショット 2020-04-29 9.47.00.png

めでたしめでたし

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1