hapi-pres
Plugin to autoload pre-requirements.
How to use:
- Install
hapi-pres
npm package in your project our plugin.npm i hapi-pres
- Register plugin in your hapi server:
Registering
const server = ; server; server;
manifest style:
registrations: ... plugin: register: 'hapi-pres' options: dirname: 'path/to/pres' ;
Your pre-requirements are available in your server
object.
serverprepreFilenamepreObjectKey
Pre-requirement Signature
'use strict'; exportspreA = assign: 'preA' { return ; };;