kb-require
Require helper for koa and koa-boot
Last updated 6 years ago by cahnory .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install kb-require 
SYNC missed versions from official npm registry.

#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');
});

Current Tags

  • 0.1.0                                ...           latest (6 years ago)

1 Versions

  • 0.1.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (3)
Dev Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |