dongyu 50bcadf73e migrate to koa@2 (#108)
* support async/await

* change nodejs version 4 or 6 to 5.6

* eslint

* remove jade
2017-05-30 20:44:57 +08:00

19 lines
308 B
JavaScript

const Koa = require('koa');
// koa app
const app = new Koa();
app.use(async function(ctx, next) {
await next();
ctx.set('X-Custom', 'Dub Dub Dub App');
});
app.use(async function(ctx, next) {
await next();
if ('/' != ctx.url) return;
ctx.body = 'Hello from www app';
});
module.exports = app;