mongoose promise while connneciting.
Closed this issue · 1 comments
janaki-sasidhar commented
mongoose.connect(url)
.then(....)
This gives syntax error.
but I tried using callback in mongoose.connect like..
mongoose.connect(url,(err,db)=>{
if (err){console.log(err)}
else {console.log('success')} //this worked
}
janaki-sasidhar commented
Sorry. It's my mistake