title: Hapi - reply with HTML
body: <p>I'm new to Hapi and Javascript and I'm trying to show a page in the browser. I have an main.html file that i want to be displayed as soons as we enter the first page, but with the code like it is I always get the error</p>
  
  <pre><code>"{"statusCode":500,"error":"Internal Server Error","message":"An internal server error occurred"}"
  </code></pre>
  
  <p>How can I display an html file?</p>
  
  <p>The js file:</p>
  
  <pre><code>var Hapi = require('hapi');
  
  var server = new Hapi.Server();
  server.connection({ port: 3000 });
  
  
  server.route({
      method: 'GET',
      path: '/',
      handler: function (request, reply) {
          reply.view('main.html');
      }
  });
  
  server.route({
      method: 'GET',
      path: '/{name}',
      handler: function (request, reply) {
          reply('Hello, ' + encodeURIComponent(request.params.name) + '!');
      }
  });
  
  server.start(function () {
      console.log('Server running at:', server.info.uri);
  });
  </code></pre>