Deploy your App

In this lesson, we'll see how the free hosting service Heroku is used to deploy a React application

No application should stay on localhost; eventually, it has to go live to see how it will perform in real-life scenarios. Heroku is a platform as a service where you can host your application, and it offers seamless integration with React. Specifically, it’s possible to deploy a create-react-app in minutes, with a a zero-configuration deployment which follows the philosophy of create-react-app.

There are two requirements before an application can be deployed to Heroku:

If you have installed Homebrew, you can install the Heroku CLI from command line:

brew update
brew install heroku-toolbelt

Now you can use git and Heroku CLI to deploy your application:

git init
heroku create -b
git add .
git commit -m "react-create-app on Heroku"
git push heroku master 
heroku open

That’s all there is to it. If you run into problems, check these resources for troubleshooting options:

Get hands-on with 1200+ tech skills courses.