How to fix: node:3966) UnhandledPromiseRejectionWarning: Error: querySrv ECONNREFUSED

How to fix: node:3966) UnhandledPromiseRejectionWarning: Error: querySrv ECONNREFUSED Hi, how to fix this issue? stackoverflow.com/questions/62066586/node39..

Comments (1)

Instinct's photo

Well I use it this way

mongoose.connect('mongodb://localhost/todo-api',{
    useNewUrlParser:true, 
    useUnifiedTopology:true,
    useFindAndModify:false
});