Freelance Web Developer

Say Hi

Nov 23, 2012

Host your first NodeJs app on Heroku in 5 mins

Heroku is a cloud platform as a service (PaaS), A cloud platforms that supports Java, Node.js, Scala, Clojure and Python and PHP (undocumented). It provides small Ubuntu virtual server instances that can be spun up and down on demand. Each instance (dynos). You get one dyno for free each month (per app). So lets get started :-

Step 1 - Signup for Heroku. Its easy go to -
Step 2 - Install the Heroku Toolbelt on your local workstation.
Step 3 - Write your nodejs app.
Step 4 - Store your app in Git

$ git init
$ git add .
$ git commit -m "init"

Step 5 - Create a Heroku App

$ heroku create

Or, if you'd like to set a name, (i.e. use:

$ heroku create myname

Step 6 - Deploy your code

$ git push heroku master

Step 7 - Visit your application. Simply open the in browser. We can now visit the app in our browser with heroku open.

$ heroku open

Labels: ,

By :