
Master ES6 promises and their role in MongoDB through a browser-based HTML game that tests promise syntax. Explore setup with a code editor, an HTML file, and the browser console.
Build a vanilla es5 JavaScript game that counts button clicks over two seconds to decide win or loss. Refactor to use promises and compare promise-based flow with es5 approach.
Refactor the game into a standalone function and implement promises to handle win or loss with resolve, reject, then, and catch.
Set up a node project with npm init, install mocha, nodemon, and mongoose, wire a user collection with mongoose, and master create, read, update, and delete operations tested by mocha.
Learn how to use Mongoose to create a users collection, define a user model and schema, and generate single records while preparing tests to read, write, and update data.
Create a user model with a schema in Mongoose, automatically establishing a users collection and enabling single-user instances through the model, export it, and prepare Mocha tests.
Learn how to ensure test isolation by dropping the users collection before each test in a Mocha suite, using Mongoose to drop all records efficiently.
Learn to read records from MongoDB with Mongoose by testing two read methods: find all users named Joe and find a user by id, using a before each setup.
Learn the id property big gotcha in mongoose and mongodb by comparing IDs with to string on both sides, and asserting that the first user's ID equals Joe's ID.
Learn four class-based removal methods in mongoose: find one and remove and find by id and remove, including removing by name or id and verifying the record no longer exists.
Explore the five ways to update records in MongoDB using Mongoose, comparing model instance updates with class-based updates, and master the set and save method.
Explore class-based updates in MongoDB, learning how to update all matching records, find one and update, and find by ID and update, with practical guidance.
Learn how to use MongoDB update operators to efficiently increment post counts across many users with class-based updates, using inc, set, and other modifiers.
Learn how to require a username in a mongoose model by making the name field mandatory and displaying a name is required error message through synchronous validation and tests.
Explore testing subdocuments in Mongoose by creating a user with an embedded post, saving, retrieving, and asserting the post title matches, demonstrating nested docs and automatic schema application.
Learn how to add subdocuments to an existing user in MongoDB by updating the posts array and saving the entire parent document, with promise-based tests.
Explain how virtual types in Mongoose let post count be computed from the posts array without persisting; illustrate via a test-driven setup and a virtual type test.
Understand virtual fields with getters calculate a user’s post count by using this.posts.length in a getter function. Learn testing in a node shell and why function scope preserves instance context.
Fixes update tests by introducing a likes property, replacing post count, and using the increment operator on a number field with tests defaulting to zero, while examining virtual fields.
Refactor the app by introducing a separate blog post collection while keeping embedded posts on the user model and adding blog post and comment models with Mongoose schemas and references.
Define a pre remove middleware on the user model to clean up associated blog posts. Use mongoose.model to access the blog post model without circular requires.
Apply sort, skip, and limit in mongoose queries to guarantee consistent test results, sorting by name ascending and guarding against latency-induced ordering issues.
Kick off a new Star Music project by installing dependencies and starting the app, then implement the find artist query and build add, edit, and delete artist pages.
Define mongoose artist and album models with a nested albums subdocument, matching the schema fields and capitalization, using locally seeded data for artists and albums.
Build an artist model in Mongoose with a subdocument albums array and property names, defining fields such as name, age, years active, image, genre, website, net worth, label name, retired.
Implement a find artist query that locates a single artist by ID and returns the query promise, wiring the artist model and album schema.
Create artists by passing artist props, save to the artist collection with artist.save, and return the promise to navigate to the details screen during rapid testing of MongoDB inserts.
Delete a single artist from the artist collection using the delete one query, test via the details screen and random artist, and verify removal with record count or robomongo.
Learn to edit a single artist in MongoDB by updating specific fields with an ID-based query in one operation, verifying changes in the app and using ES6 shorthand for clarity.
MongoDB is the hottest database solution in the tech world right now, able to power anything from your growing personal project to an enterprise infrastructure.
NodeJS focused? Yep. Test Driven Exercises? Absolutely! Advanced Features of MongooseJS? You know it.
This course will get you up and running with MongoDB quickly, and teach you the core knowledge you need to deeply understand and build apps centered around Mongo.
We'll start by mastering the fundamentals of Mongo, including collections, validations, and common record manipulation techniques. Source code is provided for each lecture, so you will always stay up-to-date with the course pacing. Special attention has been paid to creating reusable code that you'll be able to make use of on your own fantastic projects.
If you are new to MongoDB, or if you've been working to learn it but sometimes feel like you still don't quite 'get it', this is the MongoDB course for you! To learn MongoDB you have to understand it.
I've built the course that I would have wanted to take when I was learning MongoDB. A course that explains the concepts and how they're implemented in the best order for you to learn and deeply understand them.