Chapter 8. Interacting with Data – Deleting

We have learned about Creating, Reading, and Updating data using Mongoose. Now it is time to look at the final CRUD operation: deleting.

In this chapter we will:

  • Learn how to delete multiple documents in one operation
  • Learn how to delete a single document
  • Put this knowledge into action by adding the functionality to delete a user account

By the end of this chapter, you will be familiar with the different approaches you can take to delete data, and when it is best to use each one. You will also have added the ability to delete users and projects from your MongoosePM application.

Deleting data

By now it will probably come as no surprise that there are a few different methods for deleting data. The methods are: ...

Get Mongoose for Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.