An overview for today's Mongoose lecture.
We are starting with an application that will run and serve our
index page with npm start
. But, that's really all we have.
We will complete this application using Angular and Mongoose.
- Connect to Mongo using Mongoose, a node module.
- Create base GET, POST, PUT, and DELETE server-side routes.
- Implement the Mongoose syntax needed to support the above routes.
- Use Angular to add, display, update and delete books.
- Implement ability to add comments by modifying the view and client-side logic.
- Complete comments functionality on the server by using Mongoose subdocument.
- Implement a pre-save hook to filter profanity from our comments.
- Mongoose schema
- Mongoose model
- Mongoose subdocument
- Hook
Quick rundown of new syntax we will use to query our database using Mongoose.
find
findById
findByIdAndUpdate
findByIdAndRemove
save
pre