easy way to use some useful koa middlewares
npm install koa-middlewares --save
"koa-bodyparser": "0.0.2",
"koa-csrf": "1.0.1",
"koa-ejs": "0.0.1",
"koa-favicon": "1.0.1",
"koa-jsonp": "0.0.3",
"koa-logger": "1.2.0",
"koa-redis": "0.0.5",
"koa-resource-router": "0.2.0",
"koa-rewrite": "1.1.0",
"koa-router": "3.0.2",
"koa-rt": "0.0.2",
"koa-sess": "0.0.8",
"koa-static-cache": "1.0.4"
var koa = require('koa');
var middlewares = require('koa-middlewares');
var app = koa();
app.use(middlewares.bodyParser());
app.use(middlewares.jsonp());
app.use(middlewares.router(app));
middlewares.csrf(app);
app.use(function *() {
this.body = 'hello koa-middlewares';
});
app.listen(7001);
MIT