/**
 * Created by Omnius on 18/07/2016.
 */
'use strict';

const Hapi = require('hapi');
const HapiAuthBasic = require('hapi-auth-basic');
const HapiAuthHawk = require('hapi-auth-hawk');
const Inert = require('inert');


module.exports = function () {

    const server = new Hapi.Server();

    server.connection({
        host: '127.0.0.1',
        port: '9001'
    });

    server.state('Hawk-Session-Token', {
        ttl: 24 * 60 * 60 * 1000,
        path: '/',
        isSecure: false,
        isHttpOnly: false,
        encoding: 'base64json',
        clearInvalid: true
    });

    server.register([
        Inert,
        HapiAuthBasic,
        HapiAuthHawk
    ], (err) => {

        if (err) {
            throw err;
        }
    });

    return server;
};

@@ -212,16 +212,132 @@
 nert');%0A
+const Handlebars = require('handlebars');%0Aconst Vision = require('vision');%0Aconst Visionary = require('visionary');%0A
 %0A%0Amodule
@@ -722,23 +722,8 @@
 r(%5B%0A
-        Inert,%0A
     
@@ -761,16 +761,66 @@
 AuthHawk
+,%0A        Inert,%0A        Vision,%0A        Visionary
 %0A    %5D, 
@@ -888,24 +888,171 @@
  %7D%0A    %7D);%0A%0A
+    server.views(%7B%0A        path: 'views/layouts',%0A        partialsPath: 'views/layouts/partials',%0A        engines: %7Bmustache: Handlebars%7D%0A    %7D);%0A%0A
     return s

Add view manager on test server