Skip to content

Instantly share code, notes, and snippets.

@brianmacarthur
brianmacarthur / flash-app.js
Last active September 14, 2024 17:22
Flash messaging in Express 4: express-flash vs. custom middleware in ejs, handlebars, or jade
var express = require('express');
var cookieParser = require('cookie-parser');
var session = require('express-session');
var flash = require('express-flash');
var handlebars = require('express-handlebars')
var app = express();
var sessionStore = new session.MemoryStore;
// View Engines