没有配置文件,除非您自己创建一个。但是,端口是
listen()函数的参数。例如,侦听端口8124:
var http = require('http');http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello Worldn');}).listen(8124, "127.0.0.1");console.log('Server running at http://127.0.0.1:8124/');如果查找打开的端口时遇到问题,可以转到命令行并输入:
netstat -ano
查看每个适配器正在使用的所有端口的列表。



