title: Node.js: Socket.io+MEAN.js - can't emit right after connection
body: <p>I'm quite new to the Node.js and I currently have a problem to make mean.js + socket.io work properly.</p>
  
  <p>In a nutschel, the client does not receive the events emitted in the <code>on('connection',...)</code> handler, but it receives other events.</p>
  
  <p>To demonstrate my probleme, I reproduced it on a base mean.js application.  </p>
  
  <p>Steps to reproduce:  </p>
  
  <ol>
  <li><p>install mean.js:<br>
  npm install -g generator-meanjs<br>
  yo meanjs</p></li>
  <li><p>Replace server.js with this one <a href="https://gist.github.com/Nihaux/c02d61f6572d6531b60c" rel="nofollow">https://gist.github.com/Nihaux/c02d61f6572d6531b60c</a>
  (setup socket.io)</p></li>
  <li><p>Replace app/views/layout.server.view.hmtl with this one <a href="https://gist.github.com/Nihaux/05041ff4a33f0f5c7508" rel="nofollow">https://gist.github.com/Nihaux/05041ff4a33f0f5c7508</a> (launch socket io and add a link to send an event)</p></li>
  <li><p>Optional comment line 67 in config/express.js to disable express logger (too much noise).</p></li>
  <li><p>Run DEBUG=socket* node server.js</p></li>
  <li><p>With google-chrome, open the debug bar, on the network tab, websocket filter</p></li>
  <li><p>Goto localhost:3000. The websocket should appear: on the frame tab I have
  5<br>
  3probe<br>
  2probe<br>
  => I should have received a "hello" msg  </p></li>
  <li><p>Scroll at the bottom of the page and click on "TEST ME"<br>
  after refreshing the frame tab (by click on another tab then back to frame tab) I can see:<br>
  42["test:received",{"data":"test"}] ==> the message the server sent me back<br>
  42["test"] ==> the message I sent<br>
  5<br>
  3probe<br>
  2probe  </p></li>
  </ol>
  
  <p>Please, can anyone spot what I'm doing wrong?  </p>
  
  <p>EDIT:
  In fact the client does receive the event, but google-chrome does not shows it on the frame panel.</p>