Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.

mongoose.connect("mongodb://localhost:27017/YourDB", { useNewUrlParser: true });
Comment

DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.

mongoose
  .connect(DB, {
    useNewUrlParser: true,
    useCreateIndex: true,
    useUnifiedTopology: true,
    useFindAndModify: false,
  })
Comment

DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.

const mongoose = require('mongoose');

mongoose
  .connect(connection_string, {
    useNewUrlParser: true,
    useUnifiedTopology: true,
    useCreateIndex: true,
    useFindAndModify: false,
  })
  .then((con) => {
    console.log("connected to db");
  });
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript insert sibling after 
Javascript :: google apps script lock service 
Javascript :: devextreme datagrid get selected row keys 
Javascript :: babel cdn react 
Javascript :: javascript convert px to vw 
Javascript :: hack google dinosaur 
Javascript :: convert english number to bangla 
Javascript :: ajax header jquery 
Javascript :: set width screen angular 
Javascript :: Ignoring TypeScript Errors in next js 
Javascript :: how to make directory in javascript 
Javascript :: js get first object value 
Javascript :: set width of jqgrid 
Javascript :: jquery disable select 
Javascript :: ansi encoding "vscode" 
Javascript :: Error: Material-UI: The data grid component requires all rows to have a unique id property. 
Javascript :: can you use javascript split with more than one separator 
Javascript :: node sleep 
Javascript :: JS get length of an object 
Javascript :: JsonException: A possible object cycle was detected. This can either be due to a cycle or if the object depth is larger than the maximum allowed depth of 32. Consider using ReferenceHandler.Preserve on JsonSerializerOptions to support cycles. 
Javascript :: google sheets get sheet by name 
Javascript :: js wait for time 
Javascript :: javascript base64 encode string 
Javascript :: vimeo id regex 
Javascript :: for of get index 
Javascript :: es6 add and remove class 
Javascript :: disable autocomplete in react fields 
Javascript :: find in highest value key from an object javascript 
Javascript :: onEnter input field react 
Javascript :: js check string for pangram 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =