title: socket.emit and socket.on do not work in node.js
body: <p>I tried to connect my chrome browser to NodeJs Server. All the code works great on other machine. but when i run it on my machine neither it gives an error nor it gives a success. here is the code</p>
  
  <p>Server Code:</p>
  
  <pre><code>var server =  http.createServer(app).listen(app.get('port'), function(){
    console.log('Express server listening on port ' + app.get('port'));
  });
  
  var io = require('socket.io').listen(server);
  io.sockets.on('message', function (socket) {
      socket.emit('news', { hello: 'world' });
  
  });
  </code></pre>
  
  <p>and Here is the Client Code.</p>
  
  <pre><code>&lt;script&gt;
          var socket = io.connect('http://localhost:3000/');
         //console.log(socket);
          socket.on("message",function(data){
              console.log(data);
          })
      &lt;/script&gt;
  </code></pre>
  
  <p>Kindly correct me where I am doing it wrong. console.log() in client doesnot work. I tried to check it in chrome debugger using breakpoints but it never goes to that point.</p>