Hi There, i hope every one is fine
While connecting to mongo db(local), am getting this error
error MongooseServerSelectionError: connect ECONNREFUSED ::1:27017
Even i checked in services Mongodb is in runnning state and i restarted as well.
My Code is
mongoose.connect(“mongodb://localhost:27017/database_name”,{useNewUrlParser:true, useUnifiedTopology:true}).then((result) =>{
console.log(‘Server Connected’)
}).catch(err => console.log(‘error’,err))