Fix strictQuery warning from new mongoose versions

-Suppress the "DeprecationWarning: Mongoose: the `strictQuery` option will be switched back to `false` by default in Mongoose 7" warning msg when starting the explorer and using any of the scripts that connect to mongo
This commit is contained in:
Joe Uhren
2022-12-16 19:17:37 -07:00
parent ac10031bf8
commit 4047587990
5 changed files with 10 additions and 0 deletions
+2
View File
@@ -92,6 +92,8 @@ rl.question('Are you sure you want to do this? [y/n]: ', function (deleteAnswer)
console.log('Connecting to database..');
mongoose.set('strictQuery', true);
// connect to mongo database
mongoose.connect(dbString, function(err) {
if (err) {