Integrating into udaru
Once you have udaru and trail instantiated, simply call the register function:
const udaru =const TrailsManager =const register =const udaruInstance =const trailInstance =// The third argument is option and is a list of udaru hooks you want to log. If omitted, all supported udaru hooks will be logged.
Integrating into udaru and HAPI
Integration is supported via udaru-hapi-plugin.
UdaruPlugin and after
TrailPlugin and BEFORE starting the server:
const TrailPlugin =const UdaruPlugin =const UdaruTrailHapiPlugin =const Hapi =const server = Hapiawait thisserverawait thisserverawait thisserverawait thisserverstart
Testing, benching & linting
Before running tests, make sure you have a working test environment for both udaru-core and trail-core packages.
To run tests:
npm run test
Note: running the tests will output duplicate keys errors in Postgres logs, this is expected, as the error handling of those cases is part of what is tested.
To lint the repository:
npm run lint
To fix (most) linting issues:
npm run lint -- --fix
To create coverage reports:
npm run coverage
Copyright nearForm Ltd 2018. Licensed under MIT.