From the course: React: Creating and Hosting a Full-Stack Site

Schalten Sie den kompletten Kurs noch heute frei

Join today to access over 23,400 courses taught by industry experts.

Upvoting articles

Upvoting articles

"

- All right now that we've seen some basic examples of how an express server works let's make our server actually do something more relevant to our blog. What we're going to want is for our users to be able to upvote our articles to help other users see which of our articles is the most popular or most helpful. Right? So in order to do this we're going to need to add some more code to our back end. And first of all what we're going to do is just remove these hello endpoints. You can feel free to comment them out if you want but I'm just going to remove them to keep everything clean. And what we're going to do here is create an upvote endpoint that will look something like this. We're going to say app dot put and the actual path that we're going to use here is going to be slash API. All right. And yes, this is something new here. I'll talk about that in more detail later on. So for now don't worry about it. And then…

Inhalt