mongodb module: This Module is used to performing CRUD(Create Read Update Read) Operations in MongoDb using Node.js. We cannot make a database only. We have to make a new Collection to see the database. The connect() method is used for connecting the MongoDb server with the Node.js project.
Please refer this link for connect() method.
npm install mongodb
Starting MongoDB server:
mongod --dbpath=data --bind_ip 127.0.0.1
- Data is the directory name where server is located.
- 127.0.0.1 ip address where server will be running.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.