Written by
Jan Kaiponen
on
on
Completing the node.js Crash Course
I am finally getting to the end of the node.js Crash Course. It’s been very basic so far, and there’s not many things to note.
Deployment to Heroku Check-List
- PORT specified as process.env.PORT
- package.json must specify a start script
"scripts": {
"start": "node index",
"dev": "nodemon index"
},
-
Sign up for a Heroku account.
-
Have Heroku CLI installed. On a Mac:
% brew tap heroku/brew && brew install heroku
- login
% heroku login
- Create a new heroku app
% heroku create
Creating app... done, ⬢ vast-basin-09192
https://vast-basin-09192.herokuapp.com/ | https://git.heroku.com/vast-basin-09192.git
- Add a new remote for the Git repo
% heroku git:remote -a vast-basin-09192
set git remote heroku to https://git.heroku.com/vast-basin-09192.git
- Commit to master and push to heroku
$ git push heroku master
