forked from AMPATH/amrs-slackfeedback-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
40 lines (33 loc) · 716 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
32
33
34
35
36
37
38
39
40
const Hapi = require('hapi');
var Good = require('good');
const slackconfig = require('./config/slackconfig');
const server = new Hapi.Server();
server.connection({
host: slackconfig.slackserver.host,
port: slackconfig.slackserver.port,
routes: {
json: {
space: 4
}
}
});
//register routing plugin
server.register(
{
register: require('./route/app-route'),
options: {}
},
(err) => {
if (err) {
throw err;
console.log('failed to load routing plugin', err)
}
}
);
// Start the server
server.start((err) => {
if (err) {
throw err;
}
console.log('Server running at:', server.info.uri);
});