The Skier Dictionary app now allows users to add terms, but you want to allow them to delete terms when appropriate. In this video, Alex uses Express to handle delete requests for the application.
[Narrator] We're almost finished building our … Express app that handles the Ski Dictionary. … It serves static files that were delivered to … us by the front end team, and it also handles … our skier terms on some routes, so there's a … get route for returning the ski terms, and a … post route for adding a new one. … We still have one more route that we need … to build before the app is complete. … I currently have it running here in localhost.3000, … and if you come over to localhost.3000, you'll … notice there's a little trash can … icon by each of the terms. … So, if I were to click on the trash can, … I get a message that says, "are you sure … you want to remove Rip?" … is sending a delete request to localhost.3000 … dictionary slash Rip. … So, it's actually sending the term that it … Let's go ahead and add that route. … Just want to come over here to my files. … And I will say app.delete. … And this route is going to be dictionary. … that's being passed back to the route. … So, we can actually create a routing parameter …
- Making HTTP requests
- Building web and file servers
- Installing packages with npm
- Managing and linking global packages
- Working with Express, the web server framework
- Handling POST and DELETE requests
- Creating WebSockets
- Testing and debugging Node.js code
Skill Level Advanced
Node.js: Real-Time Web with Socket.IOwith Emmanuel Henri1h 24m Intermediate
Work with VSCode1m 59s
1. The HTTP Module
3. Web Servers
5. Node.js Testing
6. Automation and Deployment
- 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.