title: Using emit function in node.js
body: <p>I can't figure out why I can't make my server to run emit function.</p>
  
  <p>Here's my code:</p>
  
  <pre><code>myServer.prototype = new events.EventEmitter;
  
  function myServer(map, port, server) {
  
      ...
  
      this.start = function () {
          console.log("here");
  
          this.server.listen(port, function () {
              console.log(counterLock);
              console.log("here-2");
  
              this.emit('start');
              this.isStarted = true;
          });
      }
      listener HERE...
  }
  </code></pre>
  
  <p>The listener is:</p>
  
  <pre><code>this.on('start',function(){
      console.log("wtf");
  });
  </code></pre>
  
  <p>All the console types is this:</p>
  
  <pre><code>here
  here-2
  </code></pre>
  
  <p>Any idea why it wont print <code>'wtf'</code>?</p>