I\'m using shrinkroute https://npmjs.org/package/shrinkroute to make links in nodejs. I get error 500 ReferenceError: shrinkr is not defined
How to pass shrinkroute
One solution would be to store shrinkr in your app object using app.set:
shrinkr
// app.js ... app.set('shrinkr', shrinkr); ...
In routes/index.js, you can access it through the req.app or res.app objects:
routes/index.js
req.app
res.app
exports.showOrListUsers = function(req, res, next) { var shrinkr = req.app.get('shrinkr'); ... };