Created
April 20, 2012 19:48
-
-
Save desmondmorris/2431305 to your computer and use it in GitHub Desktop.
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
app.router.get('/:slug', function (slug) { | |
Shortlink.find( {slug: slug} , function (err, shortlink) { | |
if (err) { throw new(Error)(err) } | |
console.log( this.req ); // This returns "undefined" and I think I understand why. | |
// How do I access request and response objects from within | |
// an anon callback like this one? | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment