parent
0cbe1cab6f
commit
db7da4eb4f
1 changed files with 4 additions and 4 deletions
|
@ -11,15 +11,15 @@ let n = parseInt(process.env.MW || '1', 10);
|
||||||
console.log(` ${n} middleware`);
|
console.log(` ${n} middleware`);
|
||||||
|
|
||||||
while (n--) {
|
while (n--) {
|
||||||
app.use(function *(next){
|
app.use(function *(ctx, next){
|
||||||
yield *next;
|
yield next();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const body = new Buffer('Hello World');
|
const body = new Buffer('Hello World');
|
||||||
|
|
||||||
app.use(function *(next){
|
app.use(function *(ctx, next){
|
||||||
yield *next;
|
yield next();
|
||||||
this.body = body;
|
this.body = body;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue