re: Using Create-React-App with Express VIEW POST

VIEW FULL DISCUSSION
 

What exactly does this mean?
"When you want to deploy, just run the production build and serve your app from localhost:8080 and everything will work as planned." ?
The Production build runs on PORT 5000 should we change that to run on port 8080?

 

Hey, ayanez17.

There are two modes your app can run in. When built (port 8080) via npm run build (which creates an index.html) or when running live reload npm run start which runs on port 3000.

When running npm run start your app will proxy from port 3000 to port 8080 automatically. However when you create a production build your entire app should be running from port 8080, as express and the API's are running from the same server (in this setup).

You shouldn't need to change any ports. Does that help?

code of conduct - report abuse