title: iisnode and express
body: <p>I'm sure this question has been asked a million times but I've not found any solution to the following problem as of yet. </p>
  
  <p>I have a basic application running using nodejs and express. When I run the application in node, it by default sends me to the index.html in my public folder. Even if I don't have any routes set up. I want this to happen.</p>
  
  <p>I've installed iisnode and created a new application under 'Default Website' called 'Devices'. I put my application in there unchanged. Reading around I needed to sort some stuff out with the web.config and decided to go with the config mentioned here (not the yaml):</p>
  
  <p><a href="http://tomasz.janczuk.org/2012/05/yaml-configuration-support-in-iisnode.html">http://tomasz.janczuk.org/2012/05/yaml-configuration-support-in-iisnode.html</a></p>
  
  <p>When I try and load the app up in my browser it always tries to find the route in my app.js and throws messages back at me such as: </p>
  
  <p>Cannot GET /devices/</p>
  
  <p>I'm really pulling my hair out with this one and don't know what to do! Do I have to set up a default route for static content inside of my app.js entry point? I have the following in place:</p>
  
  <pre><code>app.configure(function(){
    app.set('port', process.env.PORT || 3000);
    app.set('views', __dirname + '/views');
    app.set('view engine', 'jade');
    app.use(express.favicon());
    app.use(express.logger('dev'));
    app.use(express.bodyParser());
    app.use(express.methodOverride());
    app.use(app.router);
    app.use(express.static(path.join(__dirname, 'public')));
  });
  </code></pre>
  
  <p>But it still doesn't hand me over to index.html when I load the application from it's root:</p>
  
  <p>'http://localhost/devices/'</p>
  
  <p>Anyone able to help me out with this?</p>