Here is my code to connect to the mongoose database:
mongoose.connect('mongodb://localhost/statistic_analysis', { useUnifiedTopology: true, useNewUrlParser: true, useCreateIndex: true })
I passed the useunifiedTopology option as suggested by the command line. But still it gives me the deprecation warning
(node:4594) 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.
I searched high and low applying almost every suggestion I could find. Still gives me the warning. I tried using MongoClient constructor too. Still gives the error. Where am I going wrong?