I just grabbed that code from an online tutorial:
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(3000, 'my.ip.is.here');
console.log('Server running at http://my.ip.is.here:3000/');
When i start:
node app.js
I get the following error:
events.js:48
throw arguments1; // Unhandled ‘error’ event
^ Error: accept ENOSYS
at errnoException (net.js:614:11)
at TCP.onconnection (net.js:788:24)
I am on a ubuntu 11.10 server VPS, i have nginx as web server but it s not started.
Am i doing something wrong ?
My version of node.js was from the git rep i tried to nodejs.org one and it now works fine.