Scaling and deploying to Heroku
Now that you have a deeper understanding of how Heroku, Node.js, Express, Gzippo, the Procfile, and the web.js
file all work together to serve your application, it is time to commence with deployment. Because Heroku stores all files as remote Git repositories, all that is needed to deploy code to your Heroku application environment, is a push. Simply run the following command in your terminal or command line to deploy your code to Heroku:
$ git push heroku master
This command works because the remote Git branch, heroku
, was created for you when you created your application either in the Heroku Dashboard or Toolkit. At this point if you navigate to your application's Dashboard and view its activity, you will see a log of your deployment, along with the Git SHA-1 of your latest commit as confirmation.
Dynos
To understand how your Heroku environment can scale, it is valuable to first understand how Heroku measures your application. Heroku applies the notion...