Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

(node:2736) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.

mongoose.connect(
  url,
  {useCreateIndex: true },
  () => {
    console.log("MongoDB is connected!");
  }
);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Use #createIndexes
ADD COMMENT
Topic
Name
5+1 =