技術

heroku + node.jsでError R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch

投稿日:

こんにちは

heroku + node.jsでアプリを作っていて、いざherokuにpushしたらerrorがでました。

Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
Stopping process with SIGKILL
Process exited with status 137
State changed from starting to crashed

node serverを立てていなくてerrorがでてたので
expressでnode serverを作成。

もう一度push

またerror。。

port番号をローカル用に5000を設定していたのですが、herokuで決められたport番号を設定しないとerrorがでるようです。
なので下記に修正

const PORT = process.env.PORT || 5000;

これで正常に動くようになりました!

-技術

執筆者:


comment

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください

関連記事

no image

TypescriptでMap使用時にコンパイルエラー

こんにちは 連想配列で重複を省く処理をしたい時にMapを使用することがあります。 …

no image

[wordpress]各固定ページに個別のCSSを読み込ませる

こんばんは wordpreddでオリジナルテーマを作成している時、各固定ページに …

no image

[Angular]APIから画像を取得して表示する

こんばんは アプリケーションを作っていてフロント側で画像を出すときって ストレー …

no image

【ionic 1.2】Native Scrolling

どうも中田です。 2015/12/10にionicの1.2が出ました! http …

[ionic] Error code 70 / requires a provisioning profile with the Push Notifications feature.

どうも中田です ionic使っててbuildで引っかかりましたー ionicでp …