How to Connect React Frontend to Express Backend (Client & Server tutorial)

Опубликовано: 02 Октябрь 2024
на канале: Abstract programmer
3,440
51

0:00 Creating a folder to contain the frontend and backend
0:22 create-react-app
0:56 Creating the initial array of data on the react app
1:46 Displaying the array of data in the React app
2:30 Creating a button to fetch data from the Node.js server
2:52 Initializing and creating the Node.js server
4:09 Using "fetch" to get data from the Node.js server
4:59 Demonstrating the CORS (cross origin resource sharing) problem
5:51 Bypassing the CORS problem with the "proxy" definition in package.json
6:28 Using a relative URL instead of the full URL of the server