title: Node.js + Express based app not running with iisnode
body: <p>I am doing some experiments with node.js + express and iisnode.
  I have the following very simple app, located in <code>C:\tsapp-deploy\tsappsvr\TestExpress\0.0.0</code>:</p>
  
  <p>app.js:</p>
  
  <pre><code>var express = require('express');
  var app = express();
  app.use(express.static(__dirname + "/public"));
  
  var port = process.env.PORT || 2709;
  app.listen(port, function() {
    console.log('Listening on port ' + port);
  });
  </code></pre>
  
  <p>package.json:</p>
  
  <pre><code>{
    "name": "TestExpress",
    "version": "0.0.0",
    "private": true,
    "dependencies": {
      "express": "3.x"
    }
  }
  </code></pre>
  
  <p>web.config:</p>
  
  <pre><code>&lt;configuration&gt;
    &lt;system.webServer&gt;
      &lt;handlers&gt;
        &lt;add name="iisnode" path="app.js" verb="*" modules="iisnode" /&gt;
      &lt;/handlers&gt;
    &lt;/system.webServer&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>public/index.html:</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html&gt;
  &lt;head&gt;
    &lt;script language="javascript" type="text/javascript" src="js/jquery.js"&gt;&lt;/script&gt;
    &lt;script language="javascript" type="text/javascript"&gt;
      $(document).ready(function() {
        console.log("READY!");
        $("#hello").html("Hello, World!");
      });
    &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;h1 id="hello" style="text-align:center;"&gt;&lt;/h1&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>My configuration is: Windows 8.1, IIS 8; iisnode version 0.2.11, node version v0.10.28.</p>
  
  <p>When launched from command line (<code>C:\tsapp-deploy\tsappsvr\TestExpress\0.0.0&gt;node app.js</code>), the app runs as expected: in the browser, I go to <code>http://localhost:2709/</code> and see "Hello, World!".</p>
  
  <p>My IIS is currently running other node.js-based applications not using express from similar locations (i.e. from <code>C:\tsapp-deploy\tsappsvr\appname\x.y.z\index.js</code>), so I assume it should be correctly configured, but when I try to run this app from the browser, typing <code>http://localhost/tsappsvr/TestExpress/0.0.0/app.js</code> I get a 404 Not Found (in IE) or a "Cannot GET /tsappsvr/TestExpress/0.0.0/app.js" in Chrome and Firefox.</p>
  
  <p>I guess that the problem might be in my web.config, but I cannot figure out how to change it to get my app working. I have tried several changes to web.config as suggested in other answers to similar questions, but no success yet.
  Any suggestions?</p>
  
  <p>Thanks in advance.</p>