部署后Heroku应用程序崩溃

时间:2015-07-21 13:45:27

标签: heroku deployment

我的Heroku应用似乎总是在部署后崩溃。

Heroku日志的错误是:

  

2015-07-21T13:28:08.173666 + 00:00 heroku [router]:at = error code = H10       desc =“App crashed”方法= GET path =“/”host = calm-hamlet-       5165.herokuapp.com request_id = 93f36ad5-f9c2-42b2-a662-9f730d1228ab       fwd =“197.253.32.226”dyno = connect = service = status = 503 bytes =

  

2015-07-21T13:29:28.127452 + 00:00 heroku [router]:at = error code = H10       desc =“App crashed”方法= GET path =“/ api / v1 / sessions”       host = calm-hamlet-5165.herokuapp.com request_id = 69711e3a-913e-45ed-       b4bf-82baaa164edf fwd =“197.253.32.226”dyno = connect = service =       status = 503 bytes =

可能导致此错误的原因是什么?

1 个答案:

答案 0 :(得分:0)

可能是端口定义问题。 Heroku将分配应用程序将运行的端口,无论您是否定义它。您应该替换这样的硬编码端口。

    var port = process.env.PORT || 5000;

希望能解决问题