title: node.js simple web server request life cycle
body: <p>I'm new to server side Javascript so to Node.js. Well, Here I'm trying some very simple thing such as</p>
  
  <pre><code>var http = require("http");
  
  http.createServer(function(request, response) {
    console.log("node server");
    response.writeHead(200, {"Content-Type": "text/plain"});
    response.write("Hello World");
    response.end();
  }).listen(2424);
  </code></pre>
  
  <p>As I see the result whenever I send a request to the server <code>console.log("node server");</code> executes twice. Why it's happening, how node (or <code>http.createServer</code>) serves a request?</p>