Heroku + node.js error (Web process failed to bind to $PORT within 60 seconds of launch)

前端 未结 24 2310
梦如初夏
梦如初夏 2020-11-22 05:42

I have my first node.js app (runs fine locally) - but I am unable to deploy it via heroku (first time w/ heroku as well). The code is below. SO doesn\'t let me write so much

24条回答
  •  不知归路
    2020-11-22 06:16

    I had the same issue because I didn't define Procfile. Commit a text file to your app's root directory that is named Procfile without a file extension. This file tells Heroku which command(s) to run to start your app.

    web: node app.js
    

提交回复
热议问题