Hapi Trailpack. This pack binds the routes compiled in trailpack-router to a Hapi Server.
Load in your trailpack config.
// config/trailpack.js
module.exports = {
// ...
packs: [
require('trailpack-core'),
require('trailpack-router'),
require('trailpack-hapi')
]
}Choose a template engine.
// config/views.js
module.exports = {
engine: 'handlebars'
}Then simply write your views in a directory called 'templates'!
See config/web.js for an example.
The web server to use. When using trailpack-hapi, server should be set to 'hapi'.
The port to listen on. 3000 by default. Can also be set via the PORT environment variable.
We love contributions! In order to be able to review your code efficiently, please keep the following in mind:
- Pull Requests (PRs) must include new and/or updated tests, and all tests must pass.
- Use
eslint! See theeslintConfigin package.json. - Please reference the relevant issue in your Pull Request.