Skip to content

Instantly share code, notes, and snippets.

@chilts
Created January 9, 2012 23:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chilts/1585673 to your computer and use it in GitHub Desktop.
Save chilts/1585673 to your computer and use it in GitHub Desktop.
middleware which needs access to 'app'
// middleware which needs access to 'app'
app.use(function(req, res, next) {
myOtherFunctionWhichNeedsApp(app, req, res, next);
});
@deedubs
Copy link

deedubs commented Jan 10, 2012

Hey @chilts, You can also do something like this https://gist.github.com/1586028

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment