Learn the process of returning information based on Mongo data.
- [Narrator] We're now going to update the code…to use MongoDB as a backend.…It'll still be pretty rudimentary as…we're only working with the to-do list,…but you will get a solid understanding of…how to interact with the Mongoose driver in Node.js.…Looking at the starting code, we'll need to…make a few changes.…Up here at the top of the script, we need to…add some code to access the Mongo database itself.…First thing that we need to do is require Mongoose…the database driver we'll be working with.…So var mongoose…is require mongoose.…
The next thing we need to do is to…tell Mongoose where it's going to…find the database to connect to.…So mongoose.connect…mongodb,…localhost for the server…and test for which database you want to access.…The next thing is to set up an interface into the database…so var db equals mongoose connection.…Now, you're going to need to define the schema…for the model you want to access.…
Mongo doesn't impose a schema, but for the…purposes of our server, we're going to set one up…in Mongoose so we only access those documents…
- Setting up the development environment
- Consuming an API using HTTPie
- Inspecting Mongo data
- Updating the server for MongoDB read functionality
- Setting up application endpoints
- Implementing user endpoints, progress endpoints, and promises
Skill Level Intermediate
Building a Slack Bot with Node.js Microserviceswith Daniel Khan2h 9m Intermediate
Building a Website with Node.js and Express.jswith Ray Villalobos3h 16m Intermediate
1. API Fundamentals
2. Database Setup
3. Set Up the Fitbit API
4. Create the Progress API
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.