koa-boot
Middleware strategy for koa app boot.
Last updated 6 years ago by cahnory .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install koa-boot 
SYNC missed versions from official npm registry.

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

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 0
Dependencies (4)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |