您好,我正在尝试在 Azure 上部署我们的 node.js 应用程序(Web/移动应用程序)。但它给出了这个错误:
events.js:183
throw er; // Unhandled 'error' event
^
Error: listen EACCES 0.0.0.0:80
我的端口监听代码是:
httpsServer.listen(process.env.PORT || 80);
它在 Google Cloud 平台上运行没有任何问题。
最佳答案
如果您在没有 root 权限的情况下运行应用程序,则不允许使用低于 1024 的端口,那么您可以尝试使用高于该端口的端口,或者以 root 用户身份运行应用程序。
关于node.js - Azure 上的错误 : listen EACCES 0. 0.0.0:80 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49553500/