Skip to content

simon-p-r/hapi-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

a loader for hapi

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published