Heroku Starter Kit

Daniel Cooper
4 min readAug 18, 2020

--

Hey, all this blog will answer the following questions about Heroku. What is Heroku? Why do we use Heroku? What are some alternatives to Heroku? How do I set up Heroku? As well as an example of how I’ve used Heroku. Alright with that out of the way let get to it.

What is Heroku?

Heroku is a cloud-based development platform-as-a-Service (PaaS) that provides a place for developers and companies to host, deploy, run, and manage their applications. A simple way to put is Heroku gives their applications a place to live online. Heroku supports a good selection of programming languages EX: Ruby, node.js, Python, etc.. Heads up to those using SQLite Heroku does not support SQLite (I learned the hard way).

Why do we user Heroku?

Reason number one for using Heroku is with this service it allows the developers to focus on the development of application more. Reason number two is Heroku is very user friendly. Everything is labeled pretty literally. What I mean by this is if you click overview you’ll see just that I can see my installed add-ons, collaborator activity, a list of the latest activity also appears. Reason three is the DevCenter is very helpful I have yet to run into a problem that was not covered on the DevCenter. This is really good for someone like myself who is new to using these types of services. When I used Heroku for the first time I was unaware of the fact that SQLite was not compatible so I had to swap my database to PostgreSQL. The DevCenter had a great guide on swapping over. Reason four is like I mentioned earlier Heroku supports Several Databases and languages. Oh, and it has a free option. These aren’t all of the reasons I think you should use Heroku but these are a decent amount as for why Heroku is a good option.

What are some alternatives?

While I was looking for Heroku alternatives I find three that kept reappearing. Those there are:

  • AWS (Amazon Web Services)

AWS Is the oldest of them and has a very developed development platform. due to this, it is a really popular pick for most teams. But it doesn’t really have much when it comes to being user friendly. But it’s not impossible after watching a few videos I was able to get a Minecraft server up and running for my friends once.

  • Azure

Azure is a very open platform on which you can host almost anything. This platform is mainly picked by companies that have an existing .NET application.

  • Google Cloud Platform

Google Cloud Platforms has a very user-friendly interface and it’s pricing system is automated and makes it more accurate and has a lower chance of you spending unnecessary money. That being said Google Cloud Platform is also the youngest of them.

Heroku Setup

First, let's install Heroku:

brew install heroku/brew/heroku

Now that we’ve installed Heroku we have access to Heroku commands so knowing that lets login with the following command.

heroku login

This command is going to make a prompt appear in your terminal. Once you see that prompt that I placed below just do what it says this should bring you to a website.

heroku: Press any key to open up the browser to login or q to exit
› Warning: If browser does not open, visit
› https://cli-auth.heroku.com/auth/browser/***
heroku: Waiting for login...

After this, you want to make make your application or if you have an existing app do the following steps on this link:

https://devcenter.heroku.com/articles/preparing-a-codebase-for-heroku-deployment

But the next step is to deploy your app to Heroku/create a Heroku app. Using this line of code:

heroku create
or
heroku create app-name-here

when this runs this you will also be creating a git remote called Heroku. Will probably be https://git.heroku.com/something random.

Now it’s time to deploy the code:

git push heroku master

Boom it’s deployed to visit your the page just do:

heroku open

Example of a Heroku app I made

So I used Heroku to host my backend and Github to host my frontend. So my app is super simple The frontend sends a Post request to the backend containing a string and then on the backend it takes that string and returns a string that is made up of every third letter in the original string. This is one way you can use Heroku you don’t have to use it just for backend though I could have also used Heroku for my front end as well.

--

--

No responses yet