DEV Community

Cover image for Deploy a React app on heroku the right way

Deploy a React app on heroku the right way

Rajesh Sharma on October 17, 2018

Deploying a react app on heroku is the easiest task when we talk about deployment. However, if you miss some important steps, you might break the...
Collapse
 
lysofdev profile image
Esteban Hernández

If we are just building once and serving static files, we could also build locally or on a dedicated build server, and deploy the static files on a CDN like S3. This will provide a faster, initial loading time. However, we can rely on Heroku as a fallback for server-side rendering.

Collapse
 
dcsan profile image
dc

how does this work for each time you build the react app, you then commit all those files to git? seems that repo would balloon out really quickly. isn't there a better way to handle temporary build files than git with heroku? seems a very frequent use case.

Collapse
 
samrullo profile image
samrullo

Are you familiar with .gitignore?