aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateja <mail@matejamaric.com>2021-05-03 18:13:10 +0200
committerMateja <mail@matejamaric.com>2021-05-03 18:13:10 +0200
commitafada334b97859106c4f320e1e529358fec7a216 (patch)
tree248c0239830ebfd391af942b48453d01f9ea804d
parent34b3fefaddd165b649c53e140f6b749c18943d26 (diff)
downloadnode-playground-afada334b97859106c4f320e1e529358fec7a216.tar.gz
node-playground-afada334b97859106c4f320e1e529358fec7a216.zip
Set `useFindAndModify` to false.
-rw-r--r--index.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/index.js b/index.js
index 177502b..b219657 100644
--- a/index.js
+++ b/index.js
@@ -4,7 +4,11 @@ const mongoose = require('mongoose');
const webRoutes = require('./routes/web');
const app = express();
-mongoose.connect('mongodb://localhost/playground_db', {useNewUrlParser: true, useUnifiedTopology: true});
+mongoose.connect('mongodb://localhost/playground_db', {
+ useNewUrlParser: true,
+ useUnifiedTopology: true,
+ useFindAndModify: false
+});
app.engine('handlebars', exphbs());
app.set('view engine', 'handlebars');