-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
25 lines (22 loc) · 677 Bytes
/
Copy pathapp.js
File metadata and controls
25 lines (22 loc) · 677 Bytes
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
var Hapi = require('hapi'),
Good = require('good'),
routes = require('./routes'),
Basic = require('hapi-auth-basic'),
config = require('./config/environment')(),
server = new Hapi.Server();
server.connection({ host: 'localhost', port: 3000 });
server.register([
{
register: Good,
options: {
reporters: [{
reporter: require('good-console'),
args: [{log: '*', response: '*'}]
}]
}
}
], function(error) {
server.start(function () {
server.log('info', 'Server running at: ' + server.info.uri);
});
});