In this video, get an introduction to the GET, POST, PUT, and DELETE methods, the request and response argument, and the handler, and then find out how to create a route for each.
- [Narrator] The bread and butter of any applications…are routes.…If you've never heard of routes,…or know what they are,…think of anytime you click on a link.…Or any time you ask for data.…A route is responsible to provide you with the page.…Or data that you requested.…Most of the routes are usually coded…with one of four methods,…such as get, post, put or delete.…It follows a pattern of request and response.…The request is the link you requested…along with the method.…And then the response provides you…with the appropriate data, page or files.…
The handler is basically the block of code…that runs once the route is called,…and before it gives a response.…Let me demonstrate.…Let's go back to VS Code.…And let's create a first route.…Remember when we actually asked for localhost.3000?…The default command is get.…And it could not 'get' because there wasn't any routes…specified for this one.…So let's go ahead and do that one.…Let's go and return on line five.…
And then let's do uh app…dot get.…This is how you actually do the syntax for the methods.…
- Creating a basic data endpoint
- Routing with Express
- Adding a static route for file serving
- Basic middleware with Express
- Built-in middleware and error-handling middleware
- Debugging in an Express application
- Security best practices with Express
Skill Level Beginner
1. Setting Up Express
2. Getting Started
3. Routing with Express
4. Middleware with Express
5. Advanced Topics in Express
- 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.