diff --git a/example.js b/example.js index 71bd557..cd5262e 100644 --- a/example.js +++ b/example.js @@ -1,32 +1,30 @@ -'use strict'; +'use strict' -const conditional = require('./'); -const etag = require('koa-etag'); -const Koa = require('koa'); -const app = new Koa(); +const conditional = require('.') +const etag = require('koa-etag') +const Koa = require('koa') +const app = new Koa() // use it upstream from etag so // that they are present - -app.use(conditional()); +app.use(conditional()) // add etags - -app.use(etag()); +app.use(etag()) // respond - app.use((ctx, next) => { return next().then(() => { ctx.body = { name: 'tobi', species: 'ferret', age: 2 - }; - }); + } + }) }) -app.listen(3000); - -console.log('listening on port 3000'); +app.listen( + 3000, + console.log('listening on port 3000') +)