Integreat routes wrapper for Hapi
Wrappes general route objects from one of the Integreat api packages, and maps routes, request objects, and response objects between Hapi and Integreat formats.
Getting started
Prerequisits
Node v8.6.
Installing
npm install integreat-hapi
Example of use with integreat-api-json
:
const hapi = const integreat = const jsonapi = const greatHapi = const great = const routes = const server = // ... whatever Hapi setup you needserverserverstart
Note that this package will not alter content-type and will return Boom on errors. To be JSON-API compliant, use the hapi-json-api package.
Running the tests
The tests can be run with npm test
.