DEV Community

Discussion on: Using Create-React-App with Express

Collapse
 
loujaybee profile image
Lou (🚀 Open Up The Cloud ☁️)

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?