Saturday, 2 January 2016

node.js basic problem

I installed node.js.var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello World\n'); }).listen(8080, "0.0.0.0"); console.log('Server running at http://0.0.0.0:8080/'); This works fine on localhost, but from the external ip address can not connect. I use windows 7, and tried turning the firewall on and off, also added the port rule for 8080 on the inbound connections, still no luck.

Submitted January 02, 2016 at 03:07PM by pwterhu

No comments:

Post a Comment