There’s no doubt [Heroku](https://hackernoon.com/tagged/heroku) is popular infrastructure platform. Times of running your own dedicated server are not gone but for development and low volume purposes using services like Heroku does make a lot of sense.\n\nRecently I worked on React frontend for cool gaming [startup](https://hackernoon.com/tagged/startup), and yes, they used Heroku for servers. It was interesting to explore Heroku since my experience is mostly with Amazon AWS and dedicated servers.\n\nDeploying static app should be easy there right? \nAt least they make it sound like that.\n\nHere is the article [https://blog.heroku.com/deploying-react-with-zero-configuration](https://blog.heroku.com/deploying-react-with-zero-configuration) \nI did not use create-react-app so it looked like I cannot use ZERO CONFIGURATION deployment option :)\n\nBut yea, being a dev, I dug under the hood and here’s what I’ve found.\n\n### There’s JSON for everything\n\nFirst of all, Heroku uses something called [Buildpacks](https://devcenter.heroku.com/articles/buildpacks) to build your app on the server.\n\nCreate react app buildpack is configured to build static node server that serves React app. It is based on [Static Buildpack](https://github.com/heroku/heroku-buildpack-static#configuration) which gave me a hint how we can configure our own repository to support Create React App buildpack.\n\nStatic buildpack uses static.json JSON config file to instruct server how to serve your application.\n\nSo basically, all you have to do to run your React app on Heroku server is…\n\n#### 1\\. Configure Heroku to use Create React App buildpack\n\n!(https://hackernoon.com/hn-images/1*GOb_ZVa-Ti-I1_qvbKzdSA.png)\n\n#### 2\\. Add static.json file to the root of my project repository\n\n!(https://hackernoon.com/hn-images/1*DFt7mS53i1_JT2aKPdJmkQ.png)\n\nThat’s it. Next time you push your repo that is connected to Heroku, app will build using Create React App buildpack, and it will start based on static.json file.\n\nIn this basic example we set a root of our server, dist/ in my case, and configure all routes to point to index.html.\n\nFor more configuration options please refer to [Static buildpack docs on configuration.](https://github.com/heroku/heroku-buildpack-static#configuration)\n\n### If it’s broken on build…\n\nOn your Activity window you can track progress of builds.\n\n!(https://hackernoon.com/hn-images/1*OyYjalrAMxSdXaB9tB6w9w.png)\n\nBuilds can break… like this :(\n\n!(https://hackernoon.com/hn-images/1*tXnsUFDR6QG3GP-Fhgm72Q.png)\n\nYou can view build log and see what is it. I only had issues after installing some new dependencies, possibly if you use Yarn, which I do.\n\nTo remedy this issue delete yarn.lock from your repo and push again. Heroku will then proceed to build a project from scratch and it will succeed.\n\nHope it helps and follow me [Alex Gvozden](https://medium.com/@mrsteel) for more React and webdev stuff.\n\nI am also available for React and ReactNative work on hourly or full time. Feel free to contact me at [email@example.com](mailto:firstname.lastname@example.org) if you want to discuss.