Référence :https://mongoosejs.com/docs/deprecations.html
Ajouter un paramètre :useFindAndModify : false
Exemple :
mongoose.connect(
MONGODB_URL, {
useFindAndModify: false
},
(err, db) => {
if (err) throw err;
console.log(`MongoDB connected on port ${MONGODB_PORT}`);
}
);