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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user