| The dev blog for cloudno.de, a new Node.js hosting platform.

Building and Hosting a Hello World Node.js App

A new application on Cloudnode requires a git repository, a sub domain and a VM to host the code. All these prerequisites are created by filling out the “New Application” form. When everything is created a result page is displayed with technical details like the git repo address or the port number of your new node server.

Initial Commit

In the next step the newly created remote repository is cloned to your local development machine. This is done by executing the cloudnode command line “cloudnode app init <appname>. During this step a sample server.js file is also created. Afterwards the newly created server.js file is commited and the repo is pushed to the remote origin.

Every push to the server updates your VM with latest code. So by executing a single command line your new app is pushed online and served to the world. 

The steps are:

  1. Create a new app by visiting the Cloundnode site.
  2. Initialize a repository on your local machine using the application name from step 1.
    $ cloudnode app init <appname>
  3. Visit the newly created app. 

Making Changes

You can make changes to your app at any time. Commit them as usual and push the changes to the remote origin. As with the initial commit your app will be updated and restarted and all changes will be live.

The steps are:

  1. Edit the source file:
    $ vi server.js
  2. Commit the changes locally:
    git commit -am “..a commit message..”
  3. Push the changes online:
    $ git push origin master 

Video

Enjoy the video which shows all steps in detail.

Soundtrack: “Transitions I” by soundprank (CC) Attribution (3.0)