I'm doing the tutorial here:
http://nodeguide.com/beginner.html
I got everything working up until this point:
var http = require('http'); var server = http.createServer(function(req, res) { res.writeHead(200); res.end('Hello Http'); }); server.listen(8080);
when I run the above using node hello_http.js
it doesn't exit as expected but then when I view localhost:8080 in the browser or curl it there's nothing. When I curl I get curl: (52) Empty reply from server
.
How should I look for the problem? One thing I should add is that I was playing around with cherrypy a couple weeks ago and when I visit localhost in my browser i see the cherrypy favicon. Is cherrypy interfering with this in some way?
Change the port from 8080 to 3000. 8080 is common port so you are most likely correct that an other server is using it.