How to Deploy Your Web App to Heroku

Dawit Gizaw
3 min readApr 23, 2020

As you all know, we have just finished the first week of Mod 3 and concluded Mod2 last Friday. With that completion came the closure of our second project group presentations. Now after me and my partner, Alex, worked hard to finish our website that we had created, we realized that it was kind of frustrating only. being able to see it and use it through our local host and actually only text out some of the user cooperation.

I decided to look into deploying the app to Heroku. Heroku is a platform as a service (PaaS) that enables developers to build, run, and operate applications entirely in the cloud. I’d seen numerous graduates use them in thie rwebsite links to show us demos in some of the other slack channels but I had no idea that deploying your app would be free and relatively pain free.

There are Two Prerequisites that I wont go into detail with.

Download the Heroku CLI and if you haven’t already download Git.

Step 1. Tracking your app using git, you want to make sure you have a repository made, with your project committed to it. Here’s a quick refresher:

**if you already have this step done, jump to Step 2

Step 2. Create a Heroku Remote,(Git remotes are versions of your repository that live on other servers)

You can use the heroku create command to create a Heroku remote

This generates a random name that hasn’t been taken

You can confirm that this exists using the git remote -v

In the case that you already have a Heroku app made but it hasn’t been linked to the current repository you want to deploy, you can use the commandheroku git:remote

Step 3. Deploying your app!

To deploy your app, you have to use the git push command to push your local repo’s master branch to your heroku remote.

Note that pushing from any other branch than than the master will not work

And just like that, you should have a deployed website with a unique url, and be able to see the database update in real time from people using your app.

--

--