title: Typescript client side socket not connecting with server
body: <p>I am attempting to recreate <a href="http://socket.io/get-started/chat/" rel="nofollow">this</a> tutorial using typescript, routing, and jade. My code compiles and runs as expected, the jade file is served correctly, but there doesn't seem to be a connection between the client side socket and server side socket. For reference, the code from the tutorial is set like this:</p>
  
  <p>Javascript file:</p>
  
  <pre><code>var io = require('socket.io')(http);
  
  io.on('connection', function(socket){
    console.log('a user connected');
  });
  </code></pre>
  
  <p>html file:</p>
  
  <pre><code>&lt;script src="/socket.io/socket.io.js"&gt;&lt;/script&gt;
  &lt;script&gt;
    var socket = io();
  &lt;/script&gt;
  </code></pre>
  
  <p>And mine looks like this:</p>
  
  <p>Server side:</p>
  
  <pre><code>import io = require('socket.io');
  var server: SocketIO.Server = io();
  
  server.on('connection', function(socket){
  console.log('A user connected');
  });
  </code></pre>
  
  <p>Client side:</p>
  
  <pre><code>declare var io: SocketIOClientStatic;
  var socket = io();
  </code></pre>
  
  <p>I've moved the relevant server and client side code to different locations and tried a few different things. I've used regular javascript (exactly like the tutorial) for the client side, I've moved the script into the jade file, and I've moved the server side script around app.ts and index.ts (which app.ts routes to). I haven't been able to get the logged message from a connection event.</p>