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:
@@ -256,6 +256,8 @@ function init_heavy(cb) {
|
||||
module.exports = {
|
||||
// initialize DB
|
||||
connect: function(database, cb) {
|
||||
mongoose.set('strictQuery', true);
|
||||
|
||||
mongoose.connect(database, function(err) {
|
||||
if (err) {
|
||||
console.log('Error: Unable to connect to database: %s', database);
|
||||
|
||||
Reference in New Issue
Block a user