Open zechtz opened 8 years ago
views.js should look like this:
module.exports = {
engine: require('ejs')
}
Hey @jaumard This is the error i am still getting
This is how my code looks using hapi
@zechtz I never used the hapi version but here is what I use for express https://github.com/jaumard/trails-example-express-gulp/blob/master/config/views.js#L7 and in fact require
is not needed sorry.
I just check the README of trailpack-hapi and all is here : https://github.com/trailsjs/trailpack-hapi#view-config :)
or alternatively in web.js
: https://github.com/trailsjs/trailpack-hapi#hapi-views
Also if you create the views.js
manually check it's loaded under index.js
or the file is ignored
Thanks, let me just try it with express.
@weyj4 do you have any ideas on this?
Actually, Trails just checks that their is an engine present, not wether the engine is valid. We found this out when we put in an invalid engine and express defaulted to serving an index.html.
I am trying to use ejs with trails but i keep on getting this error Cannot render view without a views manager configured
Here's my
views.js
ViewController.js
What could be the problem?