-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathapp.js
32 lines (28 loc) · 790 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
var Boom = require('boom');
var baseRoutes = {
register: function (server, options, next) {
var routes = [
{
method: "GET",
path: "/",
handler: function (request, reply) {
var data = { key: 'value' }
reply(data).code(201)
}
},
{
method: "GET",
path: "/error",
handler: function (request, reply) {
var error = Boom.notFound('Cannot find the requested page');
reply(data).code(201)
}
}
]
}
};
baseRoutes.register.attributes = {
name: "response-status",
version: "1.0.0"
}
module.exports = baseRoutes;