(node:5220) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead. code example
Example: collection.ensureIndex is deprecated
mongoose.connect(dbURI, {
useNewUrlParser: true,
useUnifiedTopology: true,
useCreateIndex: true,
useFindAndModify: true,
})