Closed hydrotik closed 9 years ago
Thanks for creating an issue. We definitely need to make some doc updates for hapi 9.
One thing you'll need to include in your project is a vision
plugin. vision
is what decorates server
with a views
method in hapi 9.
Yes, I was able to track down to that and got everything working with this code:
var rootHandler = function (request, reply) {
reply.view('Default');
};
server.register(require('vision'), function (err) {
server.views({
engines: {
jsx: require('hapi-react-views')
},
relativeTo: __dirname,
path: 'views'
});
// Add main app route
server.route({
method: 'GET',
path: '/',
handler: rootHandler
});
server.start(function() {
console.log(dateFormat(new Date(), format) + ' - Server started at: ' + server.info.uri);
});
});
Thanks for the quick heads up!
Nice. I opened #21 as a reminder to update the README docs and links for this repo.
https://github.com/hapijs/hapi/issues/2706