In this video, learn how to add the necessary controllers to execute the actions of the frontend and call into the backend.
- [Instructor] OK, so now that we've finished this code, … let's go ahead and test our application. … So the first thing we're going to do … is get our server started, so let's go up … and bring up our terminal, and let's make sure … that we are in the client, … and then let's go and do npm start. … And right now, a portion of our application is showing … but we're not seeing any data. … So if you look into the browser console, … you'll see an error message that mentions CORS right here. … Basically what that means is that our front-end … isn't on the same origin as the backend. … In this case, port 3000 and 8080 … and as a protection the server won't allow … the post, put, delete, and get methods … if it comes from another origin, … or in this case a different URL. … If you plan on having your front-end and backend … on the same address, you won't have this issue, … but if they will be different, we need to address it. … For this to work, we'll add a controller … with some syntax to allow CORS for our port 3000. …
- Reviewing the platforms
- Initializing the project
- Defining the first model class
- Setting up the JPA repository
- Building the endpoints for the HTTP class controller
- Creating the front-end components
- Styling components
- Connecting component to the server
- Adding server controllers
Skill Level Intermediate
1. Initial Setup
2. Spring Models
3. HTTP with Spring
4. Basic Frontend with React
- 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.