koa-boot
v0.1.0
Published
Middleware strategy for koa app boot.
Downloads
3
Readme
#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');
});