I have a node.js application that is deployed to azure using CosmosDB and the MongoDB API. My application uses mongoose which works seamlessly in 4.13.9.
My application
Add the new url parser as an option { useNewUrlParser: true }
{ useNewUrlParser: true }
Change you line 3 to:
mongoose.connect(configDB.url, { useMongoClient: true, useNewUrlParser: true } );