Join Shaun Wassell for an in-depth discussion in this video Rewriting the upvote endpoint, part of React: Creating and Hosting a Full-Stack Site.
- [Instructor] So now that our back end … to keep track of article info, … you may have noticed that our endpoints … for up-voting and adding comments … to an article will no longer work. … In order to make them work again … as we did with our article info endpoint here. … In this video, we'll be refactoring our up-vote endpoint … and later on we'll refactor our comments endpoint. … So basically, the steps we took … while writing our article info endpoint … with the up-voting endpoint, with one small difference. … Instead of just returning the results of a find one query, … we'll have to do a find one query … to find the matching article, … and then do an update query to increase … the number of up-votes that the article has in the database, … and finally, we'll send the updated article info … as a response to the client so that the client … can have the most up to date information about the article. … The first thing we're going to do … is remove these last two lines from our callback …
- Creating the app component
- Using React-Router links
- Setting up an Express server
- Route parameters in Express
- Adding the comments functionality
- Installing and adding MongoDB to your project
- Rewriting the endpoints
- Adding React hooks
- Adding buttons and forms
- Pushing code to GitHub
- Running a full-stack app on AWS
Skill Level Intermediate
1. Creating a React Front End
2. Creating a Node Back End
3. Setting Up MongoDB
4. Connecting the Front and Back Ends
5. Hosting the Site
Next steps1m 17s
- 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.