0.1.0 • Published 9 years ago

kb-require v0.1.0

Weekly downloads
1
License
-
Repository
github
Last release
9 years ago

#kb-require

Require helper for koa and koa-boot.

##Usage

Standalone:

var req = require('kb-require')();

req.require('config/dev:port'));

Without koa:

var
  app       = require('koa'),
  kbRequire = require('kb-require');

kbRequire({app: app});

app.require('config/dev:port'));

With koa and koa-boot:

var
  app       = require('koa')(),
  koaBoot   = require('koa-boot'),
  kbRequire = require('kb-require');

koaBoot()
.use(kbRequire.boot());
.boot(app)
.then(function (app) {
  app.require('config/dev:port');
});