diff options
author | Mateja <mail@matejamaric.com> | 2021-05-03 18:13:10 +0200 |
---|---|---|
committer | Mateja <mail@matejamaric.com> | 2021-05-03 18:13:10 +0200 |
commit | afada334b97859106c4f320e1e529358fec7a216 (patch) | |
tree | 248c0239830ebfd391af942b48453d01f9ea804d | |
parent | 34b3fefaddd165b649c53e140f6b749c18943d26 (diff) | |
download | node-playground-afada334b97859106c4f320e1e529358fec7a216.tar.gz node-playground-afada334b97859106c4f320e1e529358fec7a216.zip |
Set `useFindAndModify` to false.
-rw-r--r-- | index.js | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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'); |