How To Deploy Apps on Heroku

1

In this tutorial, I will illustrate how to deploy apps on Heroku using git commands.

The Setup

To deploy an app, first of all please make an account on Heroku.com

Heroku Sign Up

Heroku Sign Up

Once you signed in, you will see a button label new as mentioned

Create New App

Create New App

Click on “Create new app”

Select App Name

Select App Name

Enter the name of the app and choose your region, then click on “Create app”. Now you will be in deployment section of Heroku and can deploy your app by git commands.

Deployment

Before deployment we need to download the following:

  1. Heroku CLI (Download from here )
  2. Git (Download from here)

Once you download and install all the necessary setups. Follow these steps to deploy apps on Heroku

Step 1:

Write the command heroku login. Press any key to login to heroku except q (Prompt to quit from setup mentioned below)

Heroku Logged In

Heroku Logged In

Step 2:

In this step we need to give a path to a directory where the app or project files are. To do this type the following command

cd (Path to project files) see below

Heroku Path

Heroku Path

I have given the path to my Text To Speech App folder where all the app files are.

Step 3:

In this we need to execute the git commands to make the git repository in the folder where the app files are.

Command 1: git init (initialize empty git repository)

Command 2: heroku git: remote -a app-fortexttospeech (set the git remote to heroku)

Git Repository

Git Repository

Step 4:

This is the final step, you need to deploy the app now on heroku with the following commands

Command 1: git add . (To commit the files to deploy)

Command 2: git commit –am “make it better” (To commit the files to deploy)

Command 3: git push heroku master (Push to heroku master)

Git Commit

Git Commit

Push to Heroku

Push to Heroku

Type the following commands to open the heroku link of your app!

Command: heroku open

Open Heroku App

Open Heroku App

Heroku App Live

Heroku App Live

Congratulations your app is now deployed on Heroku!

Share.

About Author

He is a SEO content writer and a web developer by profession. Enthusiast to learn new things and spread the knowledge by converting his wisdom into words.

1 Comment

  1. Pingback: Hack to Deploy JavaScript App on Heroku - Universal Articles

Leave A Reply