trailsjs / doc

:books: Trails.js Documentation
Other
18 stars 10 forks source link

Add documentation on Views #16

Closed connor11528 closed 8 years ago

connor11528 commented 8 years ago

I see that I must configure my view engine in config/views.js. What is that configuration object supposed to look like?

Also where do my html (or ejs or jade) templates go? What is the convention for the file path?

connor11528 commented 8 years ago

for express it'll be this:

View Config

Choose a template engine.

// config/views.js
module.exports = {
  engine: 'pug'
}
Then simply write your views in a directory called 'views'!

https://github.com/trailsjs/trailpack-express