aboutsummaryrefslogtreecommitdiff
path: root/index.js
diff options
context:
space:
mode:
authorMateja <mail@matejamaric.com>2021-05-06 18:59:02 +0200
committerMateja <mail@matejamaric.com>2021-05-06 18:59:02 +0200
commite0f29f19df909b7a49ac693d82ba5ff085d079a2 (patch)
treef8264ffd563470d98549aa970088df0d0cc72e6d /index.js
parente49326610cb7843c8d905fcb04e57eeaed9d3cad (diff)
downloadnode-playground-e0f29f19df909b7a49ac693d82ba5ff085d079a2.tar.gz
node-playground-e0f29f19df909b7a49ac693d82ba5ff085d079a2.zip
Added flash messages with `connect-flash`.
Diffstat (limited to 'index.js')
-rw-r--r--index.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/index.js b/index.js
index 2d4f1a2..a49a176 100644
--- a/index.js
+++ b/index.js
@@ -3,6 +3,7 @@ const exphbs = require('express-handlebars');
const mongoose = require('mongoose');
const session = require('express-session');
const MongoSessionStore = require('connect-mongo');
+const flash = require('connect-flash');
require('dotenv').config();
const webRoutes = require('./routes/web');
@@ -27,6 +28,8 @@ app.use(session({
}
}));
+app.use(flash());
+
app.engine('handlebars', exphbs());
app.set('view engine', 'handlebars');