kb-require
v0.1.0
Published
Require helper for koa and koa-boot
Downloads
3
Readme
#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');
});