Tham khảo: https://mongoosejs.com/docs/deprecations.html
Thêm thông số: useFindAndModify:false
Ví dụ:Mã:
mongoose.connect(
MONGODB_URL, {
useFindAndModify: false
},
(err, db) => {
if (err) throw err;
console.log(`MongoDB connected on port ${MONGODB_PORT}`);
}
);