title: How to run socket.io and express on the same elastic beanstalk instance?
body: <p>We have and elastic beanstalk instance, we have some rest services and socket.io too. express is being started ad port 80. I started socket.io at 3001. but unable to connect this socket. I have also switched off the proxy, from nginx to off.
  code for socket is as below</p>
  
  <pre><code>var express         = require('express'),
      app             = express(),
      server          = require('http').createServer(app),
      io              = require('socket.io')(server), //make sockets
      port            = 3001;//port for socket
  
  //initiate server
  server.listen(port, function () {
      console.log('Socket.io listening at port %d', port);
  });
  </code></pre>