title: NodeJS + Express + Handlebars - failed to locate view "index.html"
body: <p>I have been playing a bit with Node.js.  I recently started toying with Express and have been setting up a basic app.  I wanted to use Handlebars as my view templating engine, but am hitting a wall - failed to locate view "index.html"</p>
  
  <p>I have index.html in the same directory as app.js and and so I would think the code below would have no problem locating index.html...</p>
  
  <p>I have searched around, but it would seem that comprehensive examples of anything aside from jade are rare... Anyone have experience with this combo?</p>
  
  <p>Thanks in advance!</p>
  
  <pre><code>var express = require('express')
    , app = express.createServer();
  
  app.configure(function(){
      app.set('view engine', 'handlebars');
      app.set("view options", { layout: false }) 
  });
  
  
  
  app.get('/', function(req, res){
  
      var data = {
          name: "Ford Prefect",
          home: "a small planet somewhere in the vicinity of Betelgeuse"
      }
  
      res.render('index.html', data);
  });
  
  app.listen(3000);
  </code></pre>
  
  <p><strong>Update:</strong></p>
  
  <p>I was missing:</p>
  
  <pre><code>app.set('views', __dirname + '/');
  app.register('.html', require('handlebars'));
  </code></pre>
  
  <p>in my config...  it would seem that the register of '.html' is quite important as it specifies the handlebars association with .html...</p>
  
  <p>I hope this helps someone...</p>
  
  <p>Because I am a SO noob, I can't answer my own question for 7 hrs, but if anyone needs the complete working example, I can post tomorrow...</p>