Friday, November 18

Cheap NodeJS hosting (Heroku test)


Cheap NodeJS hosting 
(Free Heroku Hosting Edition)

You can only use NodeJS for so long locally before your mind starts to wander...how much nicer your Node App would be if only it was running as a server on the internet.

This series will document my experimenting with several of the available cheap options for Node App hosting.

It should be noted you will need to have Node and NPM already installed to follow these steps.

Heroku (heroku.com)
Heroku is a cloud Platform-as-a-Service supporting several programming languages that is used as a web application deployment model.


The Setup Steps

  • Sign up for a free account
  • Verify your account.
    • check your email address, and follow the email instructions heroku sent.
  • Download and Install Heroku CLI
    • Windows installer
    • OS X installer
    • Debian / Ubuntu
      Ensure you have Ruby installed
      • wget -O- https://toolbelt.heroku.com/install-ubuntu.sh | sh
      • or standalone version
        • wget -qO- https://toolbelt.heroku.com/install.sh | sh
  • .



Five Minute Hello World Example

mkdir hello_world
cd hello_world
npm init
package.json
index.js
git init
git add .
git commit -m "init"
heroku create
git push heroku master


Heroku CLI commands you want to know

  • heroku open
    • opens your hosted app in your webbrowser
  • heroku ps:scale web=0
    • allows you to scale your dynos
    • set to 0 (ZERO) to turn your dyno off ( and not incur running costs. )
    • set to >=1 to start your dyno (Node App)
  • heroku create {app name}
    • allows you to set the name heroku uses



External Links

  • heroku.com
    • Heroku's main website
  • id.heroku.com/login
    • User login portal
  • heroku.com/nodejs
    • Heroku's landing page for explaining how to integrate nodejs
    • Most of the screen shots on this page are modified from the video playing on this page.
  • heroku.com/pricing
    • You can compare the different packages offered by Heroku here.



0 comments :

Post a Comment