aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index.js3
-rw-r--r--package-lock.json5
-rw-r--r--package.json1
3 files changed, 9 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');
diff --git a/package-lock.json b/package-lock.json
index 311bf49..ffa1331 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -346,6 +346,11 @@
"xdg-basedir": "^4.0.0"
}
},
+ "connect-flash": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/connect-flash/-/connect-flash-0.1.1.tgz",
+ "integrity": "sha1-2GMPJtlaf4UfmVax6MxnMvO2qjA="
+ },
"connect-mongo": {
"version": "4.4.1",
"resolved": "https://registry.npmjs.org/connect-mongo/-/connect-mongo-4.4.1.tgz",
diff --git a/package.json b/package.json
index 34d5e1a..b5b711a 100644
--- a/package.json
+++ b/package.json
@@ -10,6 +10,7 @@
"author": "Mateja Maric",
"license": "GPL-3.0",
"dependencies": {
+ "connect-flash": "^0.1.1",
"connect-mongo": "^4.4.1",
"dotenv": "^9.0.0",
"express": "^4.17.1",