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

前端 未结 24 1875
梦如初夏
梦如初夏 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:19

    I had same issue while using yeoman's angular-fullstack generated project and removing the IP parameter worked for me.

    I replaced this code

    server.listen(config.port, config.ip, function () {
      console.log('Express server listening on %d, in %s mode', config.port, app.get('env'));
    });
    

    with

    server.listen(config.port, function () {
      console.log('Express server listening on %d, in %s mode', config.port, app.get('env'));
    });
    

提交回复
热议问题