diff --git a/examples/simple.js b/examples/simple.js index 4829f1f..e45cc17 100644 --- a/examples/simple.js +++ b/examples/simple.js @@ -6,7 +6,7 @@ var app = koa(); // x-response-time app.use(function(next){ - return function *(){ + return function *responseTime(){ var start = new Date; yield next; var ms = new Date - start; @@ -17,7 +17,7 @@ app.use(function(next){ // logger app.use(function(next){ - return function *(){ + return function *logger(){ var start = new Date; yield next; var ms = new Date - start; @@ -28,7 +28,7 @@ app.use(function(next){ // content-length app.use(function(next){ - return function *(){ + return function *contentLength(){ yield next; if (!this.body) return; this.set('Content-Length', Buffer.byteLength(this.body)); @@ -38,7 +38,7 @@ app.use(function(next){ // custom 404 handler app.use(function(next){ - return function *(){ + return function *notfound(){ yield next; if (this.body) return; this.status = 404; @@ -49,7 +49,7 @@ app.use(function(next){ // response app.use(function(next){ - return function *(){ + return function *response(){ yield next; if ('/' != this.url) return; this.body = 'Hello World';