collection.ensureIndex is deprecated
mongoose.connect(dbURI, {
useNewUrlParser: true,
useUnifiedTopology: true,
useCreateIndex: true,
useFindAndModify: true,
})
collection.ensureIndex is deprecated
mongoose.connect(dbURI, {
useNewUrlParser: true,
useUnifiedTopology: true,
useCreateIndex: true,
useFindAndModify: true,
})
(node:2736) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.
mongoose.connect(
url,
{useCreateIndex: true },
() => {
console.log("MongoDB is connected!");
}
);
(node:2496) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.
mongoose.set('useNewUrlParser', true);
mongoose.set('useFindAndModify', false);
mongoose.set('useCreateIndex', true);
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us