Lorna’s guide to Heroku


As a newbie, whenever I tried to deploy an app on Heroku, I always had problems with it. I encountered numerous errs followed by bouts of frustration, after which I abandoned it. A few days ago, as I tried to develop a messenger chatbot, I had to use Heroku. This time, I got it right! So, I document the steps followed below. Maybe my friend Eunice (my friend who abandoned heroku after getting frustrated) will be able to get it right this time too!

This tutorial assumes you have git and heroku installed. If not install them and follow along!

  1.  Change directory to your app:
    cd myapp 
  2. If your app is not yet a git repository, initialize it:
    git init
  3. Stage your changes to be tracked by git
    git add .
  4. Commit your changes to git
    git commit -m "my first commit"
  5. To create a new heroku application, run heroku create in your terminal within the directory.
  6. To add your program files to the heroku app, run the command below:
    git push heroku master
  7. And to open it in your browser run  heroku open.
  8. With this, the app automatically opens in the browser!

Congratulations! You’ve have now deployed your first app to Heroku!

Other commands everyone must know:

  • heroku local  helps verify if heroku can run locally. Open
    localhost:5000 to prove.
  • heroku config prints the configurations set for the application
  • heroku logs this helps check for any errors that mayy have occured during the deployment. 

Let’s grow together on this journey! I hope this helps!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s