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

  1. PORT specified as process.env.PORT
  2. package.json must specify a start script
"scripts": {
    "start": "node index",
    "dev": "nodemon index"
  },
  1. Sign up for a Heroku account.

  2. Have Heroku CLI installed. On a Mac:


% brew tap heroku/brew && brew install heroku
  1. login
% heroku login
  1. 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
  1. 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
  1. Commit to master and push to heroku

$ git push heroku master

published web app (front page)