Heroku

Let's deploy our API to Heroku using Heroku CLI.

Heroku CLI

The first thing we’ll need to use Heroku is the Heroku CLI. It’s already installed here. But, if you’d like to learn how to do that, then visit the Install Heroku CLI lesson in the Appendix section.

Create an account

Visit Heroku and create an account. Under the option for “Primary Development Language,” select Node.js.

API Heroku app

Follow the steps mentioned below to create a Heroku app.

  1. After creating an account and setting a password, you’ll be redirected to a dashboard. Click “Create New App.”
  2. On the next page, you’ll be asked to provide an App name. YOu can name it something like lets-get-lunch-api.

Note: App names are unique in Heroku, so you may need some prefix here such as your initials. The references going forward will assume the app name is lets-get-lunch-api.

  1. Once your app is created, you’ll be redirected to it. Click the “Settings” tab.
  2. Within this tab, you should see a “Reveal Config Vars” button next to “Config Variables.” Click that.

Get hands-on with 1200+ tech skills courses.