小编Mut*_*amy的帖子

Heroku的Nodejs端口错误

我正在尝试将我的应用程序推送到heroku我遇到这个问题,我使用process.env.PORT变量使用正确的端口号但仍然收到此错误消息:

heroku[web.1]:  Starting process with command `node app.js`
app[web.1]:     info  - socket.io started
app[web.1]: Express server listening on port 49559 in development mode
heroku[web.1]:  Error R11 (Bad bind) -> Process bound to port 10843, should be 49559 (see environment variable PORT)
heroku[web.1]:  Stopping process with SIGKILL
heroku[web.1]:  Process exited
Run Code Online (Sandbox Code Playgroud)

您可以在此错误消息中看到应用程序正在使用正确的端口,但仍然heroku显示错误的绑定错误.任何帮助表示赞赏.

heroku node.js

4
推荐指数
2
解决办法
3464
查看次数

标签 统计

heroku ×1

node.js ×1