title: net::ERR_CONNECTION_REFUSED socket.io
body: <p>i'm trying to have a socket working on my sever</p>
  <p>here is my app.js file</p>
  <pre><code> console.log('app.js says hi');
   var express = require('express');  
   var app = express();  
   var server = require('http').createServer(app);  
   var io = require('socket.io')(server);
  app.use(express.static(__dirname + '/bower_components'));  
  app.get('/', function(req, res,next) {  
  res.sendFile(__dirname + '/index.html');
  });
  server.listen(4200);  
  </code></pre>
  <p>and my index.html file</p>
  <pre><code>     &lt;!doctype html&gt;  
       &lt;html lang=&quot;en&quot;&gt;  
       &lt;head&gt;
  
      &lt;/head&gt;
      &lt;body&gt;
      &lt;h1&gt;Hello World!&lt;/h1&gt;
      &lt;div id=&quot;future&quot;&gt;&lt;/div&gt;
      &lt;form id=&quot;form&quot; id=&quot;chat_form&quot;&gt;
          &lt;input id=&quot;chat_input&quot; type=&quot;text&quot;&gt;
          &lt;input type=&quot;submit&quot; value=&quot;Send&quot;&gt;
      &lt;/form&gt;
       &lt;script src=&quot;https://code.jquery.com/jquery-1.10.2.js&quot;&gt;&lt;/script&gt;
      &lt;script src=&quot;socket.io.js&quot;&gt;&lt;/script&gt;    
      &lt;script&gt;  
   var socket = io.connect('http://localhost:4200');
  socket.on('connect', function(data) {
      socket.emit('join', 'Hello World from client');
   });
  &lt;/script&gt;        
  &lt;/body&gt;
  &lt;/html&gt;  
  </code></pre>
  <p>and in the console log I get this error:
  <code>GET http://localhost:4200/socket.io/?EIO=3&amp;transport=polling&amp;t=LsOF2yq net::ERR_CONNECTION_REFUSED</code></p>