Deployment
Simplest
Assuming create-react-app, you need to build with yarn build
then you can just statically serve the build folder's index.html
Express Server
When developing, inside client/package.json for the create-react-app web pack
Then you can simply
Then although the react app is running on 3000, api request like above will be sent to 3001. And in production, this will appriorately just hit the main domain :)
Last updated