title: express.static : Cannot GET /
body: <p>I'm learning how to use node.js on this blog/website: <a href="http://blog.modulus.io/absolute-beginners-guide-to-nodejs" rel="nofollow">http://blog.modulus.io/absolute-beginners-guide-to-nodejs</a></p>
  
  <p>Everything worked fine until I got to the part <em>Doing Something Useful - <strong>Express</em></strong></p>
  
  <p>Express seemed to install fine with npm.</p>
  
  <p>Here's my code:</p>
  
  <pre><code>var express = require('express'),
      app = express();
  
  app.use(express.static(__dirname + '/Public'));
  
  app.listen(8080);
  </code></pre>
  
  <p>I put that into a file called test.js and put it in a folder called <code>Public</code>.
  In that folder I also added a html doc with just a few words. </p>
  
  <p>On the browser ´<a href="http://localhost:8080" rel="nofollow">http://localhost:8080</a>´ shows up with <strong>Cannot GET /</strong> and ´<a href="http://localhost:8080/index.html" rel="nofollow">http://localhost:8080/index.html</a>´ shows <strong>Cannot GET /index.html</strong></p>