(node:85106) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead. mongodb code example
Example 1: (node:2496) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.
mongoose.set('useNewUrlParser', true);
mongoose.set('useFindAndModify', false);
mongoose.set('useCreateIndex', true);
Example 2: (node:2496) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.
mongoose.set('useNewUrlParser', true);
mongoose.set('useFindAndModify', false);
mongoose.set('useCreateIndex', true);