Schedule > Intro to MongoDB & Mongoose
Week 3: Mon, Apr 12
Exercise Files
Today we will be discussing MongoDB, and how to interact with MongoDB from within your Node.js application using Mongoose.
Slides
Lecture Video(s)
- Recorded Lecture Video (53:56)
Readings
-
Introduction to MongoDB.
MongoDB website.
For your reference -
Vyas, Anshul
(2018).
Introduction to MVC.
For your reference -
Ofoegbu, Victor
(January, 2018).
The only Node.js introduction you’ll ever need.
codeburst.io.
For your reference: nice Node.js tutorial + high-level overview -
Node.js standard library.
Node Documentation.
For your reference -
Accessing standard modules.
LinkedIn Learning.
For your reference -
Exporting custom modules.
LinkedIn Learning.
For your reference -
Creating a custom modules.
LinkedIn Learning.
For your reference
Mongoose Cheat Sheet
Mongoose is a Node.js library for interacting with MongoDB. Here are some useful guides / tutorials:
- Schemas: The rules that each document in your collection must follow.
- SchemaTypes: The rules that each property in your document must follow.
- Models: The (typed) documents themselves; instances of a schema.
- Making Queries. Here are some particularly useful ones:
- query operators
- find (retrieve a collection of documents by a filter condition)
- findById (retrieve a document by its id)
- findOneAndUpdate (update an existing document)
- findOneAndDelete (delete an existing document)