Answers for "DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discove r and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor."

2

DeprecationWarning: current Server Discovery and Monitoring engine is deprecated,

mongoose.connect(uri, { useNewUrlParser: true,useUnifiedTopology:true });
mongoose.createConnection(uri, { useNewUrlParser: true });
Posted by: Guest on November-03-2020

Code answers related to "DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discove r and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor."

Browse Popular Code Answers by Language