In this exercise, you must create all the necessary routes for the lions API. Before beginning the exercise, Scott explains the middleware used to serve the client application.
(Music playing)…- Now you'll notice there's a couple…of other folders in here.…We have this client folder.…You will not be working in a client folder.…This is just like a static website…that is, like, doing some crud.…It's doing some crud on the resource.…But you will be in the server folder,…mainly in server.js.…There's a lot of stuff going on here.…The first thing it says is make this work.…But, as you can see, you're going to get so much error…you have to figure that stuff out.…
But, I'm also doing some new things in here,…and I'm telling you what I'm doing.…So, before, when we had to serve that inter state html,…we had to manually read the file,…the res.sin file.…Express is smart enough to know that…you already want to do that.…So it ships with this build in middle ware…called Express.static,…which takes in a directory, a path or directory,…and any request that comes to that directory,…it will automatically serve it…as a static asset.…And it knows what mine type to set it to…based on the extension or the file name.…
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.