Deploy Your React App To Heroku

Requirements:

  • Node / NPM — Click the link and download the installer
  • Git — Click the link and download the installer
  • Heroku CLI — Click the link and download the installer

Steps:

  1. Sign up for Heroku
  2. Setup our React App for deployment
  3. Create Heroku git repository

Step 1 — Sign up For Heroku

Visit heroku for free hosting

Step 2 — Setup React App

package.json • Before
  • Press enter
  • Press enter
package.json • After

Step 3 — Create Heroku Git Repository

  • heroku --version
  1. heroku login (Enter your heroku credentials)
  2. git init
  3. git add .
  4. git commit -m “initial commit”
  5. heroku create (You should see two links after running this command. Copy the second one)
  6. git remote add heroku *PASTE THE LINK YOU JUST COPIED*
  7. git push heroku master
  • heroku open
  1. git add .
  2. git commit -m “any message goes here”
  3. git push heroku master

Easier Method 😁

Enjoy your free hosting!

--

--

--

Software Engineer

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Shakhor Smith

Shakhor Smith

Software Engineer

More from Medium

Let’s get to know React Js

Creating an Authentication Form using React Hook Form, React and Firebase.

Trick for Conditional Rendering in Navlink component of React Router

Working with React: The Basics