node.js - simple hello world app don't work


I'm trying hard to learn Node.js, but because the lacks of tutorials I having hard time learning it.

So I have the following code -

var http = require('http');

var server = http.createServer();

http.request(function (req, res) {

    res.writeHead(200);

    res.write("Hello World");

    res.end();
});

server.listen(5000);

So after I compile it, I type in chrome localhost:5000 and crap it does not work..
What I did wrong?

take a look at nodejs site

var http = require('http');

http.createServer(function (req, res) {

    res.writeHead(200);

    res.write("Hello World");

    res.end();
});

server.listen(5000);