In this exercise, you must connect the routes with their controller methods.
(Eastern wind music)…- The first thing you want to do is on step ten…that's where we left off…with the controllers…we just need to hook up the routes.…If we go to the API…and go to the routes…all these routes are here but they don't have…their cred on them.…They need stuff like…dot get.…Then we need to be able to call the controllers…that we already have here…and register the appropriate functions.…
For example I'm just going to walk through one right now.…This is the category routes.…On a get request to…slash API slash category…I want to run the…controller dot get method.…I get controller up here because I say…var controller equals require…the category controller.…- You typed request there.…
- Oh, thanks.…Now I can run controller dot get…which if we go look at the controller…it's right here.…That's why we exported these…so we can require them here.…Then we'll do the same thing for all the other routes.…
This course was created by Frontend Masters. It was originally released on 12/30/2015. We're pleased to host this training in our library.
- Executing Node.js
- Using Express
- What is middleware?
- Testing in Node.js
- Using Mongo with Node.js
- Data modeling
- Querying data with Mongoose
- Identifying sensitive routes
- Configuring the deployment
Skill Level Intermediate
Node.js: Build Your First Microservicewith Daniel Khan2h 9m Intermediate
Building APIs Using Hapi in Node.jswith Kirsten Hunter2h 23m Intermediate
Node.js: Extend and Maintain Applicationswith Daniel Khan3h 35m Intermediate
2. REST APIs
5. Organization and Configuration
7. Data Modeling
10. Securing Routes
- 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.