title: Why console.log() is called two times instead of one?
body: <p>I've this simple node server:</p>
  
  <pre><code>var http = require('http');
  
  http.createServer(function (req, res) {
    res.writeHead(200, {'Content-Type': 'text/plain'});
    res.end('Hello World\n');
    fun();
  }).listen(9999, '127.0.0.1');
  
  function fun () {
    setTimeout(function(){
      fun();
      console.log('fun');
    }, 3000);
  }
  
  console.log('Server running at 127.0.0.1:9999');
  </code></pre>
  
  <p>But opening 127.0.0.1:9999 "fun" appears two times each 3 second, instead of just one time. Why?</p>
  
  <hr>
  
  <p>Solved:</p>
  
  <pre><code>var http = require('http');
  
  http.createServer(function (req, res) {
    res.writeHead(200, {'Content-Type': 'text/plain'});
    res.end('Hello World\n');
  }).listen(9998, '127.0.0.1');
  
  fun();
  
  function fun() {
          setTimeout(function(){
                  fun();
                  console.log('fun');
          }, 3000);
  }
  </code></pre>
  
  <p>Now "fun" appears one time each three seconds.</p>