Hosting NodeJs Application on Heroku Platform using Heroku CLI

Pre-requisite

Logging Into Heroku

Specify the version of node

Specifying a start script

Create Heroku App and Remote Repository on Heroku

heroku create todo-app-rest-backend-nodejs

​Rename Your APP — Optional

​Build your app and run it locally — Optional

Deploying Code To Heroku

If your Project has Environment Variables then Follow Below Along

Set a config variables on heroku app

Examples:

heroku config:set GITHUB_USERNAME=joesmith

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store