> For the complete documentation index, see [llms.txt](https://docs.ionicfirebaseapp.com/flutter-clothing-app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ionicfirebaseapp.com/flutter-clothing-app/deployment/heroku-node-js-api.md).

# Heroku Node JS API

## Heroku NodeJS Api

How to Deploy NodeJS API on Heroku Cloud Server.Install Heroku Cli

Once you are done with all the required changes in finish local setup of the project and ready for production.

You need to install [Heroku-cli](https://devcenter.heroku.com/articles/heroku-cli#download-and-install). It's available for MAC, Linux and Windows machine. Please follow this link and install CLI for deployment.[ The Heroku CLI | Heroku Dev CenterHow to download, install, and start using, the Heroku CLI. The Heroku CLI used to be part of the Heroku Toolbelt.devcenter.heroku.com](https://devcenter.heroku.com/articles/heroku-cli#download-and-install)

## Check Heroku-CLI installation <a href="#check-heroku-cli-installation" id="check-heroku-cli-installation"></a>

```
$ heroku --version
```

If above command return the version number of heroku-cli then your heroku cli install and ready for deployment.

You need to Login with your heroku credential

```
$ heroku login // It will ask your heroku Email / pass 
```

## Create Heroku app and Deploy  <a href="#create-heroku-app-and-deploy" id="create-heroku-app-and-deploy"></a>

1. Login to [https://dashboard.heroku.com](https://dashboard.heroku.com/) .
2. Create New app

![](https://1237221500-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LpbDAHHvjvV9ewH6eOp%2F-Lq56QhNObCs1ZiYnqhq%2F-Lq56jrYU5JvQw7wz3qZ%2Fimage.png?alt=media\&token=385e0543-01e0-4db5-9695-d5e1456f164a)

dashboard‌

Once app created go to the deploy Tab and you can see your app git info that required app to deploy.![](https://blobscdn.gitbook.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-LC94KDKiVaEQxG_b57S%2F-LkNbz19ls6wYeeCjCxN%2F-LkOnqk-I-tj6feBbALM%2FImage%202019-07-22%20at%206.37.25%20PM.png?alt=media\&token=fe3063e7-2733-4ec2-98c5-69cf6a788266)Heroku used Git to deploy your script‌

In our project you need to navigate inside the dist folder of api. Production dist will create once you run command

```
gulp build  // It will create Production build 
```

1. Navigate inside the **dist** directory.
2. Run **git init** in dist directory.
3. Add Heroku repository to your project.
4. You can commit the code and the push to Heroku. code commit command given on above screenshot.

```
gulp buildcontrol:heroku   // Use this command to Push on Heroku
```
