【发布时间】:2013-09-07 22:41:53
【问题描述】:
我确实将所有需要的包和 node.js 安装到专用机器 Windows 2008 Server。
var http = require('http');
var port = 1337;
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(port, '127.0.0.1');
console.log('Server running at http://127.0.0.1:' + port );
所以当我打电话时 http://local.host:1337/, 我得到“你好世界” 但如果尝试从另一台机器调用此服务: http://my.domain.ip.address:1337/ 哎呀,我什么也看不见。 我已经完全关闭了防火墙
感谢所有建议
【问题讨论】:
-
你通常会在另一台服务器后面部署节点,如果性能不是一个大问题,最简单的方法是将它放在 IIS 后面,如果你得到 WebMatrix,它带有内置配置文件如果您创建一个 Node 项目,那(我只是不知道它们在哪里可以在线获得)。
标签: windows node.js configuration