Skip to content

Instantly share code, notes, and snippets.

@jade-itworkswhy
Created March 13, 2020 13:01
Show Gist options
  • Save jade-itworkswhy/a57766d87d6ddaa37d29d3acf0664ee0 to your computer and use it in GitHub Desktop.
Save jade-itworkswhy/a57766d87d6ddaa37d29d3acf0664ee0 to your computer and use it in GitHub Desktop.
app.use(async function(req, res, next) {
res.locals = {
beokCategories: beokCategories,
user: req.user || null,
success_msg: req.flash('success_msg'),
error_msg: req.flash('error_msg'),
error: req.flash('error'),
moment: require('moment-timezone'),
statusCode : require('./config/statusCode'),
helper : require('./config/helper'),
location : { id : 'unknown', name : 'WHERE' },
subLocation : { id : 'unknown', name : 'AM I' },
debugURL : debugURL
}
next()
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment