Deploy Node.js to Heroku
I used the folder “Desktop/restful” as my REST API folder.
First, create a free Heroku account.
Then, create a new app “morning67890” on Heroku.
Download the Heroku Command Line Interface(CLI)
1 $ brew install heroku/brew/heroku I copyed all files of my RESTAPI from my old RESTAPI folder to the folder “Desktop/restful”.
Under “Desktop/restful” folder:
1 $ heroku login Check node version:
1 $ node --version The noder version shoulde be higher than 10.