0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

(基本)HerokuにNodeJsアプリをデプロイする際に確認すべき4つのポイント

Last updated at Posted at 2021-05-03

#1.ポート設定

index.js
const PORT = process.env.PORT || 5000;
app.listen(PORT, () => {
  console.log("Server up!!")
})

#2.使用中のNode,NPMバージョンの指定

package.json
 "engines": {
    "node": "使用中のバージョンを記載(14.15.0など)",
    "npm": "使用中のバージョンを記載(7.7.6など)"
  }

#3.開始スクリプトの指定

package.json
"scripts": {
    "start": "node index.js"
}

#4.gitignoreファイルの作成

.gitignore
node_module
etc..
0
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?