title: res.sendFile is not a function Node.js
body: <p>I am not able to send a HTML file using node.js</p>
  
  <p>So first off this is the error I am getting</p>
  
  <pre><code>Application has thrown an uncaught exception and is terminated:
  TypeError: res.sendFile is not a function
      at Server.&lt;anonymous&gt; (C:\Program Files\iisnode\www\test\app.js:4:6)
      at emitTwo (events.js:88:13)
      at Server.emit (events.js:173:7)
      at HTTPParser.parserOnIncoming [as onIncoming] (_http_server.js:529:12)
      at HTTPParser.parserOnHeadersComplete (_http_common.js:89:23)
  </code></pre>
  
  <p>and my app.js code is</p>
  
  <pre><code>var http = require('http');
  
  http.createServer(function (req, res) {
      res.sendFile('test.html', { root: __dirname });
  }).listen(process.env.PORT);  
  </code></pre>
  
  <p>If I am missing something simple, I am sorry as this is the first node.js program I have made</p>