2
I’m in trouble in:
let options = 'replicaSet=XPTO&readPreference=secondary';
var url = `mongodb://${user}:${password}@${host}/admin?${options}`;
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.
Even using {useNewUrlParser: true} after ${options} I still have the same problem. Can help?
Edit the question by adding the code snippet where you make the connection.
– Luiz Felipe
I’ve done it, it didn’t work out so well!
– Develop For Web
Have you edited providing the code snippet as Luiz instructed? I’m not seeing in your question
– Sorack
Yes, I’ve put the url =
mongodb://${user}:${password}@${host}/admin?${options},{useNewUrlParser: true}
;– Develop For Web