Ex No 5
Ex No 5
Create a NodeJS server using Express that creates, reads, updates and deletes students'
details and stores them in MongoDB database. The information about the user should be
obtained from a HTML form.
Program Explanation:
• First we are importing modules express and mongoose,
• Next we are connecting monodb by mongoose.connect() method. Copy the link
connection String in MongoDb Atlas at Drivers section.
• Next we are creating a Schema of our Collection and we are naming the collection as
“Students”.
• Next we are performing CRUD operations our Collection.
• Next we are viewing the all the documents inserted in Database.
• You can also view the inserted documents in the inserted Database.