I have my controller like this
//Get the Helpers var authHelper = require('authHelper'); //Route router.get('/manager', authHelper.checkPerm(req, res, next), function(req, res) { }); my authHelper.js
exports.checkPerm = function(req, res, next){ if (req.user) { next(); } else { res.redirect('/sign-in'); } } This is the error i am getting
router.get('/manager', authHelper.checkPerm(req, res, next), function(req, res ^ ReferenceError: req is not defined