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