title: How to use Hapi.js to serve a static HTML index
body: <p>With express.js i can do this </p>
  
  <pre><code>var express = require('express');
  var app = express();
  var server = require('http').createServer(app);
  var io = require('socket.io')(server);
  var port = 9200;
  
  var path = require('path');
  
  var options = {
      index: "html/index.html"
  };
  
  
  
  app.use('/', express.static('res', options));
  server.listen(port);
  console.log("Listening on port " + port);
  </code></pre>
  
  <p>How do i achieve the same thing using Hapi.js?</p>
  
  <p>I have tried some things also with inertjs but I can't seem to find the correct way. Does anyone have experience with it?</p>
  
  <p>Found my way to this implementation, but im getting TypeErrors:
  TypeError: Cannot read property 'register' of undefined</p>
  
  <pre><code>server.register(require('inert'), (err) =&gt; {
  
      if (err) {
          throw err;
      }
  
      server.route({
          method: 'GET',
          path: '/index',
          handler: function (request, reply) {
              reply.file('C:/blabla/html/index.html');
          }
      });
  });
  </code></pre>