Skip to content

Instantly share code, notes, and snippets.

@discretepackets
Last active December 16, 2015 01:59
Show Gist options
  • Save discretepackets/5358968 to your computer and use it in GitHub Desktop.
Save discretepackets/5358968 to your computer and use it in GitHub Desktop.
module.exports = function(app){
var res = app.response;
res.flash = function(type, msg) {
res.cookie("floored-flash", "test");
}
res.flash.error = function(msg) {
res.flash("error", msg);
}
res.flash.notice = function(msg) {
res.flash("notice", msg);
}
return function(req, res, next){
next();
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment