title: Socket.io 400 (Bad Request)
body: <p>I have this piece of code on my server </p>
  
  <pre><code>    var express = require('express');
      var routes = require('./routes');
      var user = require('./routes/user');
      var http = require('http');
      var path = require('path');
  
  var app = express();
      var server = require('http').Server(app);
      var io = require('socket.io')(server);
  
      server.listen(3000);
  
      io.sockets.on('connection', function (socket) {
        console.log("Socket connected");
      });
  </code></pre>
  
  <p>I just want to create a connection </p>
  
  <p>and on the client -</p>
  
  <pre><code>&lt;script src="public/javascripts/socket.io.js"&gt;&lt;/script&gt;
       &lt;script&gt;
          var socket = io.connect('http://127.0.0.1:3000');
       &lt;/script&gt;
  </code></pre>
  
  <p>And when I open my browser I get this error in console:</p>
  
  <pre><code>GET http://127.0.0.1:3000/socket.io/1/?t=1404410309733 400 (Bad Request) socket.io.js:1659
  XHR finished loading: GET "http://127.0.0.1:3000/socket.io/1/?t=1404410309733". 
  </code></pre>
  
  <p>I've already done this like 10 times and I never get this. Does anyone know how to fix it?</p>