title: Broadcast method with Express.io
body: <p>I have a problem with <code>Express.io</code>: I try to create a chat but I am not able to use the <code>Broadcast</code> method.</p>
  
  <p>No error message, but nothing happens.</p>
  
  <p><strong>app.js</strong></p>
  
  <pre><code>var express = require('express.io')
      , index = require('./routes/index.js')
      , http = require('http')
      , path = require('path');
  
  var app = express();
  
  app.configure(function(){
    //configure options
  });
  
  app.http().io();
  
  app.get('/', index.index);
  
  app.io.route('ready', function(req) {
      req.io.broadcast('newUser');
  });
  
  app.listen(app.get('port'), function(){
      console.log("Express server listening on port " + app.get('port'));
  });
  </code></pre>
  
  <p><strong>user.js</strong></p>
  
  <pre><code>io = io.connect();
  
  io.emit('ready');
  
  io.on('newUser', function(data) {
      console.log("New user !!");
  });
  </code></pre>
  
  <p><strong>Error 2</strong></p>
  
  <pre><code>WebSocket connection to 'ws://tchat.aws.af.cm/socket.io/1/websocket/n8Jm9Q7YYL8YdPRN4dxU' failed: Unexpected response code: 502 
  </code></pre>