Horje
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. Code
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 });
{ useNewUrlParser: true } to MongoClient.connect. warnning
mongoose.connect("mongodb://localhost:27017/YourDB", { useNewUrlParser: true });
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,
  })
To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect
MongoClient.connect("mongodb://localhost:27017/YourDB", { useNewUrlParser: true })
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");
  });




Javascript

Related
length of dict js Code Example length of dict js Code Example
jquery on enter key pressed Code Example jquery on enter key pressed Code Example
react-native italics Code Example react-native italics Code Example
text decoration in react Code Example text decoration in react Code Example
javascript remove quotes from string Code Example javascript remove quotes from string Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11