2017-07-21 16 views
0

私は展開しようとしていますが、このエラーは私を行かせることができません。Herokuエラーの展開

2017-07-21T02:57:41.976265+00:00 app[web.1]: webpack: Compiled successfully. 
2017-07-21T02:57:43.657908+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch 
2017-07-21T02:57:43.658077+00:00 heroku[web.1]: Stopping process with SIGKILL 
2017-07-21T02:57:43.988993+00:00 heroku[web.1]: Process exited with status 137 
2017-07-21T02:57:44.004007+00:00 heroku[web.1]: State changed from starting to crashed 

これは私のサーバー設定です。

const PORT = process.env.PORT || 5000; 
app.listen(PORT, 'localhost', err => { 
    err && console.error(err); 
    console.log(`Listening at 
    ${chalk.bold.cyan(`http://localhost:${PORT}/`)}`); 
}); 

答えて

0

あなたはlocalhostを指定しないでください、またはノードは、ローカルインタフェースをリッスンし、Herokuのプロセスマネージャは、あなたのプロセスが実際に実行されていることを確認することができません。

app.listen(PORT, err => { 
    err && console.error(err); 
    console.log(`Listening at 
    ${chalk.bold.cyan(`http://localhost:${PORT}/`)}`); 
}); 
+0

その後、解決としてあなたはその質問をマークする必要があり – 4knort

+0

を働いたこと、ありがとう:) https://stackoverflow.com/help/accepted-answer –

関連する問題