Quantcast
Channel: Node.jsタグが付けられた新着記事 - Qiita
Viewing all articles
Browse latest Browse all 9047

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

$
0
0
はじめに 自分の学習過程で学んだ事をこの記事に載せています。 気づいたことがあればその都度追記していきます 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..

Viewing all articles
Browse latest Browse all 9047