Code files
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
'use strict'
|
||||
|
||||
module.exports = devStatic
|
||||
|
||||
function devStatic (server) {
|
||||
server.route({
|
||||
method: 'GET',
|
||||
path: '/{param*}',
|
||||
handler: {
|
||||
directory: {
|
||||
path: 'public'
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
'use strict'
|
||||
|
||||
module.exports = index
|
||||
|
||||
function index (server) {
|
||||
server.route({
|
||||
method: 'GET',
|
||||
path: '/',
|
||||
handler: function (request, reply) {
|
||||
const title = 'Hapi'
|
||||
reply.view('index', {title})
|
||||
}
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user