In this tutorial, I will illustrate how to deploy apps on Heroku using git commands.
To deploy an app, first of all please make an account on Heroku.com
Once you signed in, you will see a button label new as mentioned
Click on “Create new app”
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.
Before deployment we need to download the following:
Once you download and install all the necessary setups. Follow these steps to deploy apps on Heroku
Write the command heroku login. Press any key to login to heroku except q (Prompt to quit from setup mentioned below)
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
I have given the path to my Text To Speech App folder where all the app files are.
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)
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)
Type the following commands to open the heroku link of your app!
Command: heroku open
Congratulations your app is now deployed on Heroku!