hapi-loader

0.0.5 • Public • Published

hapi-loader

Build Status Current Version

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

Readme

Keywords

Package Sidebar

Install

npm i hapi-loader

Weekly Downloads

2

Version

0.0.5

License

BSD-3-Clause

Last publish

Collaborators

  • simon-p-r