npm.io
0.0.2 • Published 10 years ago

controller-autoload

Licence
ISC
Version
0.0.2
Deps
0
Vulns
0
Weekly
0

controller-autoload

A simple autoloader for your controller. Simply require it and pass in your restify server and controller folder. This will save you having to load them yourself in the routes/controller directory.

Install

npm install --save controller-autoload

Usage

var routes  = require('controller-autoload');
var restify = require('restify');

var server = restify.createServer({});
routes(server, 'routes');

Loading your routes should come after loading your restify middleware.

License

MIT