From the course: React: Securing Applications
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Create your API endpoints - React.js Tutorial
From the course: React: Securing Applications
Create your API endpoints
- [Instructor] Now that we've got a server running. We can start adding the code we need to serve API endpoints. Let's get to it. So, if you go into the Exercise Files, and then in the Resources folder here, you have a data.txt. So, this is basically the data that we're going to serve for the front end to read. So, if we take a look at this, this is basically a list of some of my old courses, and we're going to create a data point with that. So, what I'm going to do is basically copy all of this. And copy it like so. So, that's all you need to do. And now what we're going to do is go back to our code in VS code, and we're going to create inside of the index dot js a get call, and that's going to be our end point. So, let's go ahead and do that. So, after somewhere around here, I'm going to create a get endpoint, and this is going to be a list of my courses. And then a request and response, which are primarily the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Initial setup of your server6m 59s
-
(Locked)
Create your API endpoints4m 4s
-
(Locked)
Initial Auth0 setup2m 38s
-
(Locked)
Adding the files and code from Auth03m 44s
-
(Locked)
Update index for Auth0 integration4m 2s
-
(Locked)
Add connections to server5m 46s
-
(Locked)
Finalize menu with login5m 54s
-
(Locked)
-
-