Skip to content

Instantly share code, notes, and snippets.

@chovy chovy/gist:3786219
Created Sep 26, 2012

Embed
What would you like to do?
//middleware
app.use(function(req, res, next){
if ( req.session.user ) {
req.session.logged_in = true;
}
res.locals.message = req.flash();
res.locals.session = req.session;
res.locals.q = req.body;
res.locals.err = false;
next();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.