I am using Mongoose with my Node.js app and this is my configuration:
mongoose.connect(process.env.MONGO_URI, { useNewUrlParser: true, useUnifiedTopol
const url = 'mongodb://localhost:27017'; const client = new MongoClient(url);
Cut the upper 2nd line then Just Replace that's line
const client = new MongoClient(url, { useUnifiedTopology: true });