From the course: React: Authentication

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Adding a sign-up route to the server

Adding a sign-up route to the server - React.js Tutorial

From the course: React: Authentication

Adding a sign-up route to the server

- [Instructor] All right, so now that we know a little bit more about JWTs and how they work, let's get started integrating them into our full Stack React applications. So we can close our front end files for now because we're going to be jumping into our backend. And really the first thing we're going to do here is we're going to open up server js and add our first route. Now, just as a warning here, our server is rapidly going to get a little bit too big to comfortably fit inside this file. So we'll probably be breaking it out into several files at some point. But for now, we'll just get started here by creating a signup route. So here's what this is going to look like. We're going to create a post route, so we'll say app post. This basically just means that the front end will have to send a post request instead of a get request to sign up, which is, you know, kind of what's typically expected in this case. And for the path we're going to make the path/API/signup. Okay. So now that…

Contents