Last active
August 29, 2015 14:07
-
-
Save joepie91/a178a90ab0f0ceb2fd10 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 shelf = /* initialize bookshelf here */ | |
app.use(function(req, res, next) { | |
req.db = shelf; | |
req.model = shelf.model.bind(shelf); | |
return next(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment