UNPKG

337 BJavaScriptView Raw
1
2/**
3 * Module dependencies.
4 */
5
6var koa = require('koa');
7var filter = require('..');
8
9var app = koa();
10
11app.use(filter());
12
13app.use(function *(){
14 this.body = {
15 name: 'tobi',
16 email: 'tobi@segment.io',
17 packages: 5,
18 friends: ['abby', 'loki', 'jane']
19 }
20});
21
22app.listen(3000);
23console.log('app listening on port 3000');
\No newline at end of file