技術

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 を使っています。コメントデータの処理方法の詳細はこちらをご覧ください

関連記事

自分のEvernoteをブログとして公開できる『Postach.io』を使ってみました

こんにちは。たなかです。 自分のEvernoteをブログとして公開できる『Pos …

no image

【Rails】productionモードでCSSの画像が表示されない

どうも中田です。 css内で画像を設定して、productionモードで動かすと …

「Google Inside Music」で自分の好きな音楽を聞いてみる(local環境構築 編)

以前紹介した「Google Inside Music」。 「Google Ins …

[Xcode] The executable was signed with invalid entitlements. でアプリを実機確認できない!

こんにちは。たなかです。 作ったiOSアプリを実機確認したくて、Xcodeからデ …

[Angular] has no exported member ‘XXXLoginComponent’.

どうも中田です Angularでコンポーネント名を階層構造にあった名前にしようと …