Learn about getting all documents, getting a single document, and using query parameters for filters.
- [Instructor] In the start directory…of the exercise files for this module,…the index.js file is set up…with the Mongo connectivity we built,…along with a Hapi server definition.…If you'd like to dive deeper into Hapi,…you can check out my course on building APIs…using node.js and Hapi in the library.…For now, I'll give you a quick tour.…First, we'll tell Hapi to create a server…which listens on port 8080.…The routes come next.…They're kind of tricky…but notice that they're very clearly defined.…
There's an http method,…there's a path, and then there's a handler…to define what happens when that route is triggered.…I've placed stubs here for each…of the functions we'll be implementing,…to avoid a lot of copying and pasting.…At the bottom, the MongoClient.connect command…defines the collection and then it starts the Hapi server.…First we'll tackle the read functionality.…The get for the API tour list is our first task.…How do you think we'd retrieve a list…of all the tours in the system?…This is very similar to what we were doing earlier…
- Installing MongoDB for Windows and OS X
- Why Mongo?
- Document-oriented data
- Exploring the Mongo shell
- Importing data into the database
- Building an application in Node.js
- Tuning Mongo queries
- Replication and sharding
Skill Level Intermediate
1. Understand MongoDB
2. Explore the System
3. Build an Application in Node
Node MongoDB setup4m 59s
4. Advanced Topics
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
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.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.