In this intro to the series, we review the main topics covered throughout the series and install the tools required to follow along: Node JS, Mongo DB, and the Turbo CLI.
In this video, we set up a Node & Express application then connect it to our local Mongo DB server.
We define our Profile schema in this video using the Mongoose schema() function which provides useful tools to maintain data consistency throughout our Mongo DB.
Seed DataRegister or Log In to View
In order to have some initial data to work with, we "seed" our Mongo DB with static JSON objects. Using the Mongo CLI, we import those objects into our database as records enabling us to query for objects using query filters.
QueriesRegister or Log In to View
Querying our Mongo DB can be done a number of ways in and this video, we cover the most common approaches.
ID QueriesRegister or Log In to View
Querying for records in our Mongo DB using filters is very useful but not always the most efficient. If we already know the unique ID of the record we need, we can query for it directly using that ID. In this video, we cover the Mongoose method for this situation.
Creating DataRegister or Log In to View
Adding records to our Mongo DB is quick and easy using the Mongoose ORM. In this video, we set up a simple form which posts data to an endpoint we set up just for creating profiles and add a new record to our Mongo database from the web interface.
Updating DataRegister or Log In to View
We set up a simple endpoint for updating records in our Mongo DB based in the unique ID and key-value pairs for the changed fields.
Removing DataRegister or Log In to View
Removing data from a Mongo DB is as easy as updating with the Mongoose ORM. In this video, we set up a simple endpoint for removing records based on the unique ID.
DeploymentRegister or Log In to View
We cap off the series by deploying our Node/Express project to Turbo and our Mongo DB to the mLab service. We then test all the CRUD functions on our staging environment to confirm that the project behaves the same as it does on local.