8
Fri Oct 28 2022 08:31:13 GMT+0000 (Coordinated Universal Time)
Saved by
@Vrushabh_123
// Connecting to DB
mongoose
.connect(
'mongodb+srv://tanaypratap:<your-password-here>@neog-cluster.wfxlp.mongodb.net/myFirstDatabase?retryWrites=true&w=majority',
{
useUnifiedTopology: true,
useNewUrlParser: true,
},
)
.then(() => console.log('Successfully connected'))
.catch((error) => console.error('mongoose connection failed', error))
content_copyCOPY
Comments