This code doesn't work in version 9.0.3:
server.route({
    method: 'GET',
    path: '/',
    handler: function() {
        file: 'templates/index.html'
    }
});
Error:
de_modules/hapi/node_modules/hoek/lib/index.js:723
    throw new Error(msgs.join(' ') || 'Unknown error');
          ^
Error: Unknown handler: file
In version 8 it worked well.
I've resolved the problem. From last versions this possiblity was cutted away. After I include "inert" module and registered it, that works fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With