Created
April 22, 2013 01:09
-
-
Save cjpartridgeb/5431818 to your computer and use it in GitHub Desktop.
for rpcesar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var RTII = function(req, res, next){ | |
types.list(function(types_){ | |
req.types = types_; | |
return next(); | |
}); | |
}; | |
app.get('/some/handler/that/needs/types', RTII, function(req, res){ | |
// req.types available here | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment