diff options
-rw-r--r-- | index.js | 3 | ||||
-rw-r--r-- | package-lock.json | 5 | ||||
-rw-r--r-- | package.json | 1 |
3 files changed, 9 insertions, 0 deletions
@@ -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", |