hapi-loader
v0.0.5
Published
hapi loader helpers
Downloads
3
Readme
hapi-loader
Some load utils for hapi
Installation
npm install hapi-loader
Usage
var Loader = require('hapi-loader');
Input is a relative or complete path to routes, the directory structure must contain folders called endpoints and handlers, see the example in test/fixtures directory
var routes = Loader.loadRoutes(directory);
Routes will be an array of routes which can be passed to hapi's server.routes() method for registering
var schemas = Loader.loadSchemas(directory);
Schemas will be an object contain schemas for loading by a plugin's addSchemas method