【发布时间】:2017-04-08 06:25:36
【问题描述】:
我在这里搜索了有关此错误的其他问题,但找不到解决方案。
昨天我在Azure上部署了一个Node + Express + Socket.IO网站,还是不行。我得到了错误
Application has thrown an uncaught exception and is terminated: Error: listen EACCES 0.0.0.0:80
在这段代码中:
// more code ...
var app = express();
var server = require('http').Server(app);
var io = require('socket.io')(server);
// right here
server.listen(portNumber, function () {
console.log('Server listening at port %d', portNumber);
});
// more code ...
看起来好像另一个进程已经在监听这个端口。也许是 IIS 服务器?我不确定。
【问题讨论】:
-
您是否为您的应用设置了任何环境变量(Azure 门户中的应用设置)?