-
Notifications
You must be signed in to change notification settings - Fork 3
/
app.js
31 lines (25 loc) · 657 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
'use strict';
var util = require('util');
var Hapi = require('hapi');
var taunus = require('taunus');
var taunusHapi = require('taunus-hapi')(taunus);
var routing = require('./controllers/routing');
var routes = require('./controllers/routes');
var layout = require('./.bin/views/layout');
var port = process.env.PORT || 3000;
var server = new Hapi.Server();
server.connection({ port: port });
routing(server);
server.register({
register: taunusHapi,
options: {
routes: routes,
layout: layout
}
}, registered);
function registered () {
server.start(started);
}
function started () {
console.log('Hapi listening on port %s', port);
}