bumpity boop co
This commit is contained in:
parent
938a67c94f
commit
38d5bad4d1
3 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
HEAD
|
||||||
|
==================
|
||||||
|
|
||||||
|
* update co
|
||||||
|
|
||||||
0.1.1 / 2013-12-19
|
0.1.1 / 2013-12-19
|
||||||
==================
|
==================
|
||||||
|
|
|
@ -94,13 +94,14 @@ app.use = function(fn){
|
||||||
app.callback = function(){
|
app.callback = function(){
|
||||||
var mw = [respond].concat(this.middleware);
|
var mw = [respond].concat(this.middleware);
|
||||||
var gen = compose(mw);
|
var gen = compose(mw);
|
||||||
|
var fn = co(gen);
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
return function(req, res, next){
|
return function(req, res, next){
|
||||||
var ctx = self.createContext(req, res);
|
var ctx = self.createContext(req, res);
|
||||||
next = next || ctx.onerror;
|
next = next || ctx.onerror;
|
||||||
ctx.onSocketError(next);
|
ctx.onSocketError(next);
|
||||||
co.call(ctx, gen)(next);
|
fn.call(ctx, next);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"co": "~2.3.0",
|
"co": "~3.0.0",
|
||||||
"debug": "*",
|
"debug": "*",
|
||||||
"mime": "~1.2.11",
|
"mime": "~1.2.11",
|
||||||
"fresh": "~0.2.0",
|
"fresh": "~0.2.0",
|
||||||
|
|
Loading…
Reference in a new issue