Installing io.js JavaScript I/O on Ubuntu

I have been wanting to install io.js on my Ubuntu system for a while so I figured I would create a blog to maybe help some one else.
    • io.js should always be shown as lower case letters
    • io.js is a fork of Joyent’s Node.js ™
    • io.js is fully compatible to the npm package manager for javascript
    • io.js suggest they will be providing faster and predictable release cycles
    • io.js suggest they will operate under a “open governance model”
    • io.js is using SemVer (Semantic Versioning Specification)

I want to use nvm to manage and control multiple versions of node.js and now io.js.
So lets get started by selecting the Dash icon Dash on your desktop and then type “terminal” and then click on the Terminal Icon as shown below with the green arrow:
Terminal
The first thing I do before installing anything on my machine is to first to an Advanced Packaging Tool (APT) update and upgrade.
This is shown below in the code snippet:

sudo apt-get update

sudo apt-get upgrade

Then we need to make sure your system has a c++ compiler we can do that with the following shown below:

sudo apt-get install build-essential libssl-dev

After that is complete we can now need to make sure that we have the cURL command line tool for Linux again shown below:

sudo apt-get install curl

Now we should be able to use curl to get the latest version of nvm, at this time the version was 0.23.2 you may need to change that when the version updates shown below:

When this is complete you should see “Close and reopen your terminal to start using nvm”.

We will use nvm to install io.js on now using the following command shown below:

nvm install iojs

When that is complete you should see “Now using io.js v1.0.4. (This is the latest version at this time, you may see a newer version depending on version updates).

Now we need to start using the Read-Eval-Print-Loop (REPL) program.

We can get this REPL version by typing the following command shown below:

iojs

This will produce a the following > caret.

>

At the caret we can type in some of the following information for testing io.js REPL.

To start testing io.js REPL we can type in the following after the > caret.

> 1+3

Now press the enter key and you should see the following:

> 1+3

4

Finally we can test another example by typing the following:

> myarray = [‘a’, ‘b’, ‘c’];

Press Enter after entering this and you should see the following:

[‘a’, ‘b’, ‘c’]

Finally type in the following line shown below:

> myarray.forEach(function (v){console.log(v);});

This will produce the following lines shown below:

a

b

c

This blog post was a beginning set of blog post to help others install, and begin to install io.js on their Ubuntu Linux machine.

I will work on trying to continue to give examples of io.js and develop other applications soon to show the complete functionality that will help explain io.js.

Please keep checking back to see other tutorials soon.

One Comment on “Installing io.js JavaScript I/O on Ubuntu

  1. Pingback: IOT/M2M is easier with Node-RED!! | Allan F. Gagnon

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: