Skip to content

Instantly share code, notes, and snippets.

@cjpartridgeb
Created April 22, 2013 01:09
Show Gist options
  • Save cjpartridgeb/5431818 to your computer and use it in GitHub Desktop.
Save cjpartridgeb/5431818 to your computer and use it in GitHub Desktop.
for rpcesar
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