koa-boot

0.1.0 • Public • Published

koaboot

Middleware strategy for koa app boot.

Usage

var
  koa = require('koa'),
  koaboot = require('koaboot');

koaboot()
.use(function * (next) {
  this.app.config = {
    port: 80
  };
  yield next;
})
.boot(koa())
.then(function (app) {
  app.listen(app.config.port);
})
.fail(function () {
  console.log('boot failed');
});

Readme

Keywords

none

Package Sidebar

Install

npm i koa-boot

Weekly Downloads

2

Version

0.1.0

License

none

Last publish

Collaborators

  • cahnory