From Node.js v0.10.31 Manual & Documentation I copied example, like:

var http = require('http');

http.createServer(function (request, response) {
  response.writeHead(200, {'Content-Type': 'text/plain'});
  response.end('Hello World\n');
}).listen(8124);

console.log('Server running at http://127.0.0.1:8124/');

If you save example like "example.js" and after starting server in command prompt with:

node example.js

in your browser go to the address:

http://localhost:8124/

and you should see "Hello World"