we are use online MongoDB database
Fist of all we create our connection uri from monogdb
Go to mongoDB
signup & create Project
click on connect and copy URI string
Now we are go to our code and see what is good practise to connect server to mongoDB
Basically we have to approach to connect with database
- write code in Entry point (index.js)
- create a seprate file and write code on that
write code in Entry point (index.js)
`;(()=>{
})()`
Top comments (0)