Grokking ExpressJS
Vote

0% completed

​

Performing CRUD Operations with MongoDB

Five routes cover what a client does with the bookstore's books: create one, list them, read one, change one, and delete one. Together these four kinds of work are called CRUD, for Create, Read, Update, and Delete. Each route in this lesson calls one Mongoose method on the Book model from the previous lesson, and one error-handling middleware turns database errors into clear HTTP responses.

OperationRouteMongoose methodSuccess status
CreatePOST /booksBook.create()201 Created
Read manyGET /booksBook.find()200 OK

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content