title: iisnode not starting node process
body: <p>I have a very simple nodejs https server that I'm trying to get working with <code>iisnode</code>, but it doesn't appear that the node process is starting, so I get a 500 error when I try to navigate to it.</p>
  
  <pre><code>const express = require('express');
  const app = express();
  const bodyParser = require('body-parser');
  const fs = require('fs');
  const cors = require('cors');
  var https = require('https');
  
  app.use(bodyParser.json());
  app.use(cors());
  
  app.get('/', function (req, res) {
    res.send('Hello World!')
  });
  
  var secureServer = https.createServer({
    key: fs.readFileSync('private.key'),
    cert: fs.readFileSync('certificate.pem')
  }, app).listen(process.env.PORT || 3443, function () {
      console.log('Secure Server listening on port 3443');
  });
  </code></pre>
  
  <p>This application starts fine if I do node server.js, but when I try to rely on the node virtual directory that was set up by the <code>setupsamples.bat</code> script, it doesn't seem to work.  My Web.config also looks like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;configuration&gt;
    &lt;system.webServer&gt;
      &lt;handlers&gt;
        &lt;add name="iisnode" path="server.js" verb="*" modules="iisnode" /&gt;
      &lt;/handlers&gt;
      &lt;modules&gt;
        &lt;remove name="MyAuthModule" /&gt;
      &lt;/modules&gt;
      &lt;security&gt;
        &lt;authorization&gt;
          &lt;add accessType="Allow" users="?" /&gt;
        &lt;/authorization&gt;
      &lt;/security&gt;
      &lt;rewrite&gt;
        &lt;rules&gt;
          &lt;rule name="mcServer"&gt;
            &lt;match url="mcServer/*" /&gt;
            &lt;action type="Rewrite" url="server.js" /&gt;
          &lt;/rule&gt;
        &lt;/rules&gt;
      &lt;/rewrite&gt;
    &lt;/system.webServer&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p><code>MyAuthModule</code> is a custom authentication module that was set up for me in my environment, so if I don't have that remove statement, I get an error about the module not existing.</p>
  
  <p>I placed <code>server.js</code>, the Web.config displayed above, and the certificate files into its own <code>mcServer</code> directory in <code>iisnode/www</code> directory that was created by running the setupsample.bat script.  When I navigate to <code>https://myUrl/node/mcServer</code>, I get a 500 error, but if I navigate to <code>https://myUrl/node</code>, it displays the different apps that are available, and like I said, the node process is not running, so I think that's part of the 500 error that I get.</p>
  
  <p>It's also good to note that I installed the url rewrite module, so that shouldn't be the issue, and <code>helloworld/readme.htm</code>, but once again, I'm assuming this is because node hasn't started.</p>
  
  <p>I must be doing something totally stupid, but I cannot figure it out.</p>