screener app for Hapi
Note: master branch will always test the latest @hapi npm packages.
If you're looking for a specific version:
npm install
node server.jsOnce you have added shared functionality to
@contrast/test-bench-utils
and
@contrast/test-bench-content,
you are ready to add an endpoint in the test bench application.
Create a routes/ruleName/index.js file and call the controllerFactory method:
const controllerFactory = require('../../utils/controllerFactory');
exports.name = 'hapitestbench.ruleName';
exports.register = controllerFactory('ruleName');Check the documentation for controllerFactory under utils/controllerFactory.js
usage information.
Add a views/pages/ruleName.ejs file that includes the shared template from
@contrast/test-bench-content:
<% include ../../../node_modules/@contrast/test-bench-content/views/ruleName.ejs %>Now run the app and make sure everything works as expected!