部署到Heroku应用程序期间出现NodeJS应用程序错误

时间:2018-07-27 13:23:25

标签: node.js reactjs heroku

我正在尝试将项目部署到herokuapp,但是出现一些错误:

2018-07-27T08:27:30.827410+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/robots.txt" host=ihealth99.herokuapp.com request_id=54687736-9467-4484-93d6-b2f016548ce2 fwd="140.213.36.56" dyno= connect= service= status=503 bytes= protocol=https
2018-07-27T08:27:30.828380+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=ihealth99.herokuapp.com request_id=56351cf4-d736-4688-957b-8430d136a3b5 fwd="140.213.36.56" dyno= connect= service= status=503 bytes= protocol=https
2018-07-27T08:27:33.083646+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=ihealth99.herokuapp.com request_id=0558bd4d-42aa-48c5-9c37-05dd43a9e1b9 fwd="140.213.36.56" dyno= connect= service= status=503 bytes= protocol=https

有人知道这是怎么回事吗?

1 个答案:

答案 0 :(得分:0)

app.listen(process.env.PORT || 3000, function(){
  console.log("app is up and running");
});

heroku部署的服务器端口未固定。