trailsjs / trailpack-koa

:package: Koa Trailpack
MIT License
3 stars 1 forks source link

trailpack-hapi

Gitter NPM version Build status Dependency Status Code Climate

Hapi Trailpack. This pack binds the routes compiled in trailpack-router to a Hapi Server.

Usage

Load in your trailpack config.

// config/trailpack.js
module.exports = {
  // ...
  packs: [
    require('trailpack-core'),
    require('trailpack-router'),
    require('trailpack-hapi')
  ]
}

Configuration

See config/web.js for an example.

server

The web server to use. When using trailpack-hapi, server should be set to 'hapi'.

port

The port to listen on. 3000 by default. Can also be set via the PORT environment variable.

Contributing

We love contributions! In order to be able to review your code efficiently, please keep the following in mind:

  1. Pull Requests (PRs) must include new and/or updated tests, and all tests must pass.
  2. Use eslint! See the eslintConfig in package.json.
  3. Please reference the relevant issue in your Pull Request.

License

MIT