Express Applications throwing 500 on azure

≡放荡痞女 提交于 2019-11-29 14:44:07

Azure Web Apps (web sites) listen on ports 80 and 443 only. You can not listen on port 8080.

You'll need to listen on port process.env.PORT. And you can easily run both locally and in Azure by tweaking your port code to something like:

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!