Just sharing
If you got these error messages below,
(node:48490) 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.
(node:48490) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
Change the code something like this
mongoose.connect(
process.env.MONGOD_URL || mongodb://localhost:27017/fdaksjfafdsfasa,
{ useNewUrlParser: true, useUnifiedTopology: true },
(err) => {
if (err) console.error(err);
else console.log("Connected to the mongodb");
}
);
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Just sharing
If you got these error messages below,
(node:48490) 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.
(node:48490) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
Change the code something like this
mongoose.connect(
process.env.MONGOD_URL ||
mongodb://localhost:27017/fdaksjfafdsfasa
,{ useNewUrlParser: true, useUnifiedTopology: true },
(err) => {
if (err) console.error(err);
else console.log("Connected to the mongodb");
}
);