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. 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
Check Heroku-CLI installation
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
Create Heroku app and Deploy
Login to https://dashboard.heroku.com .
Create New app
dashboard
In our project you need to navigate inside the dist folder of api. Production dist will create once you run command
Navigate inside the dist directory.
Run git init in dist directory.
Add Heroku repository to your project.
You can commit the code and the push to Heroku. code commit command given on above screenshot.
Last updated