Answers for "mongoose use unified topology"

0

mongoose use unified topology

// source: https://mongoosejs.com/docs/migrating_to_6.html#no-more-deprecation-warning-options

// No longer necessary:
mongoose.set('useFindAndModify', false);

await mongoose.connect('mongodb://localhost:27017/test', {
  useNewUrlParser: true, // <-- no longer necessary
  useUnifiedTopology: true // <-- no longer necessary
});
Posted by: Guest on October-19-2021

Code answers related to "mongoose use unified topology"

Code answers related to "Javascript"

Browse Popular Code Answers by Language