I deployed node.js to Amazon EC2 Windows instance. Here is the js code which I run:
require('http').createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(80);
It works perfectly when I am accessing http://localhost
But it doesn’t work when I’m trying to access the server through external IP: http://[external IP]
when I run “netstat -ano” I can see this line:
0.0.0.0:80
if I run IIS, then it adds two lines
0.0.0.0:80
[::]:80
What does [::] mean? And why it’s not added when I run node.js? I think, that is why node.js isn’t serving requests to external IP. How can I make node.js work on Windows?
(re-posting comment as answer)
You might have to reconfigure your firewall, it is probably configured too strict.