爲什麼我不能在node.js中使用端口80?當我在node.js中調用listen函數時,端口和ip地址的規則是什麼?哪些是允許的,爲什麼?Node.js端口和號碼的限制
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Yo');
}).listen(80, "127.0.0.1");
謝謝!
可能重複的HTTP ://stackoverflow.com/questions/6109089/how-do-i-run-node-js-on-port-80) – vcsjones