2017-07-31 11:33:31 +05:30

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})
}
})
}