Closed therabithole closed 3 years ago
Still an issue, also get this one now: (node:20464) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.
Need to update db.js in the startup directory:
from:
module.exports = function() {
const db = config.get('db');
mongoose.connect(db)
.then(() => winston.info(`Connected to ${db}...`));
}
to:
module.exports = () => {
const db = config.get('db')
mongoose
.connect(db, { useNewUrlParser: true, useUnifiedTopology: true })
.then(() => winston.info(`Connected to ${db}...`))
}
(node:6448) DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect. (node:6448) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor. Done!