16 lines
296 B
JavaScript
16 lines
296 B
JavaScript
'use strict'
|
|
|
|
module.exports = index
|
|
|
|
function index (server) {
|
|
server.route({
|
|
method: 'GET',
|
|
path: '/',
|
|
handler: function (request, reply) {
|
|
const title = 'Hapi'
|
|
request.logger.info(`rendering index view with ${title}`)
|
|
reply.view('index', {title})
|
|
}
|
|
})
|
|
}
|