title: "Cannot GET /" when trying to connect to local express server
body: <p>After completing Code School's node.js course I followed <a href="https://gist.github.com/dbainbridge/2424055" rel="nofollow">this</a> guide on how to set up a socket.io server with express 3, but when I try connecting to localhost:8080, it gives me "Cannot GET /".<br>
  My firewall is set to allow incoming and outgoing requests on port 8080, and I have the latest versions of express and socket.io installed.  My code is as follows:</p>
  
  <p>app.js</p>
  
  <pre><code>var express = require("express");
  var socket = require("socket.io");
  
  var app = express();
  app.use(express.static(__dirname + "/public"));
  var server = app.listen(8080);
  var io = socket.listen(server);
  </code></pre>
  
  <p>index.html</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;script src="/socket.io/socket.io.js"&gt;&lt;/script&gt;
          &lt;script type="text/javascript"&gt;
              var server = io.connect("http://localhost:8080");
          &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;p&gt;Test&lt;/p&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Directory structure</p>
  
  <pre><code>C:\Users\Joseph\Desktop\test\node_modules
                              \public\index.html
                              \app.js
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>This also does not work in app.js:</p>
  
  <pre><code>var http = require("http");
  var express = require("express");
  var socket = require("socket.io");
  
  var app = express();
  app.use(express.static(__dirname + "/public"));
  var server = http.createServer(app);
  server.listen(8080);
  var io = socket.listen(server);
  </code></pre>