Y have this message when start npm "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."
Asked
Active
Viewed 945 times
0
-
I finded the answer on this [link](https://stackoverflow.com/questions/50448272/avoid-current-url-string-parser-is-deprecated-warning-by-setting-usenewurlpars). – BrandConstantin Sep 22 '19 at 12:03
1 Answers
0
So, for this and other obsolete warnings, I have done this:
mongoose.connect('mongodb://localhost:27017/databasename', { useUnifiedTopology: true, useNewUrlParser: true, useCreateIndex: true }, (err, res) => {

BrandConstantin
- 919
- 6
- 9