---
title: "Discussion on \"How to host your Node API on Heroku using your Git Repository\" | Hashnode"
description: "Discussion on \"How to host your Node API on Heroku using your Git Repository\". There are several ways to host your Node API on Heroku. A common method is using the Heroku CLI which can get complicated especially for a beginner.\nBut did you know, you can host your app without even downloading the CLI.  \nI know right?\nAll you nee..."
url: "https://hashnode.com/posts/how-to-host-your-node-api-on-heroku-using-your-git-repository/609a35571ea29f2c341e43ce"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to host your Node API on Heroku using your Git Repository](https://toluolawumi.hashnode.dev/how-to-host-your-node-api-on-heroku-using-your-git-repository?utm_source=hashnode&utm_medium=feed)

There are several ways to host your Node API on Heroku. A common method is using the Heroku CLI which can get complicated especially for a beginner. But did you know, you can host your app without even downloading the CLI. I know right? All you nee...

May 11, 2021 · 3 min read · toluolawumi.hashnode.dev  
Read the article

-   [#nodejs](https://hashnode.com/tag/nodejs)
-   [#heroku](https://hashnode.com/tag/heroku)
-   [#express](https://hashnode.com/tag/express)
-   [#github](https://hashnode.com/tag/github)
-   [#coding](https://hashnode.com/tag/coding)

## Written by

[Tolu Olawumi](https://hashnode.com/@toluolawumi)

@toluolawumi · Lagos, Nigeria

  
[View profile](https://hashnode.com/@toluolawumi)

## Responses 2

Markdown supported · ⌘↵ to post

[Obong Daniel](https://hashnode.com/@Obongidiyake)

[May 20, 2021](https://hashnode.com/posts/how-to-host-your-node-api-on-heroku-using-your-git-repository/609a35571ea29f2c341e43ce/comment/60a5f2b94e7f9549fc32fe8f)

Hi, what variables are we to set on the Reveal config part? I set it to the port number I used on my local host and my app crashed.

[Tolu Olawumi](https://hashnode.com/@toluolawumi)

[May 20, 2021](https://hashnode.com/posts/how-to-host-your-node-api-on-heroku-using-your-git-repository/609a35571ea29f2c341e43ce/comment/60a5f2b94e7f9549fc32fe8f#reply-60a60c064e7f9549fc3301de)

Hey Daniel,

The variables for the config vars are all the variables you set in your .env file like your connection string and port. In your code, did your set your port like this: process.env.PORT || 6000.

[Obong Daniel](https://hashnode.com/@Obongidiyake)

[May 20, 2021](https://hashnode.com/posts/how-to-host-your-node-api-on-heroku-using-your-git-repository/609a35571ea29f2c341e43ce/comment/60a5f2b94e7f9549fc32fe8f#reply-60a614dd4e7f9549fc3302c9)

Yes, I did. And that's what I set it with. But my app crashed. [Tolu Olawumi](https://hashnode.com/@toluolawumi)

[Tolu Olawumi](https://hashnode.com/@toluolawumi)

[Jun 5, 2021](https://hashnode.com/posts/how-to-host-your-node-api-on-heroku-using-your-git-repository/609a35571ea29f2c341e43ce/comment/60a5f2b94e7f9549fc32fe8f#reply-60bb8e69e36d51141c95b0be)

Hey Daniel [Obong Daniel](https://hashnode.com/@Obongidiyake) , were you able to resolve this?

[Ayobami Oguntolu](https://hashnode.com/@Ayo_Spark)

[May 18, 2021](https://hashnode.com/posts/how-to-host-your-node-api-on-heroku-using-your-git-repository/609a35571ea29f2c341e43ce/comment/60a3e2a2eeabf031a1a970ed)

Awesome! super easy.
