filmov
tv
Serve a React app from an Express server | React frontend and Express API setup in 1 project!

Показать описание
React and Express are the most popular web framework stack. Many developers create their React and Express projects separately. This means that you have to host 2 different projects: a server, and the static react site. But ExpressJS is a server that can serve static files. So with a little bit of setup, we can serve your React app from your Express app from 1 project.
00:00 Intro
04:13 React app setup
10:47 Express app setup
17:27 Problem: React fetch from API
24:30 Solution: serve static react app from Express
29:17 Rendering the data
31:33 The other problem: development environment
34:52 Solution: proxy
00:00 Intro
04:13 React app setup
10:47 Express app setup
17:27 Problem: React fetch from API
24:30 Solution: serve static react app from Express
29:17 Rendering the data
31:33 The other problem: development environment
34:52 Solution: proxy