Teaching how to use NodeJS in your local environment

Installing NodeJS

This section assumes that you are using the Xubuntu development environment that was built in this document. If using other environment, you will have to adapt the commands/paths accordingly.

  • Run the following commands:

sudo apt-get install curl -y

sudo curl -sL https://deb.nodesource.com/setup_4.x |
sudo -E bash

install -y nodejs

Note: for Enterprise Linux and Fedora Linux distributions (OEL, RH, etc.)

sudo su –

curl –silent –location https://rpm.nodesource.com/setup_4.x |

sudo yum -y install nodejs

  • Confirm Node is installed by typing node –version

For more information refer to https://nodejs.org/en/download/package-manager/

Test your NodeJS envionrment using Nikolay Anastasov’s Web Chat

Feel free to read the instructions on the page.

  • Create a directory called “nodejs-private-webchat” – Then unzip the demo that you downloaded into this directory
  • Make sure you are inside the directory “nodejs-private-webchat“. Then, install the Web Chat dependencies using NPM:

    npm install

    This will install 4 dependencies indicated in package.json (ejs, express, gravatar and socket.io)

Make sure it completes successfully.

  • Then run the main app.js

    node app.js

    It will start the Web Chat Application running on port 8080

  • Then open 1 browser and go to: http://%5Byour _IP]:8080

    This should open a page where you can create a new private room:

  • Enter your Name and your email address.

Note: This Web Chat uses Gravatar in order to show your photo associated with your email. If you still don’t have a Gravatar account, create one! So that this Web Chat and plenty of other places your selected photo can be displayed, instead of an anonymous “grey avatar”.

In order to create a new Gravatar account go to: https://en.gravatar.com/ – If you Already have a WordPress account, you can use that one to log in. Otherwise you can create a new account.

  • You should see that a new Private chat has been created for you and someone you invite.
  • Send the provided link to start chatting.

  • Once another person joins your private chat, the two of you should be able to start chatting.


Author: Carlos Rodriguez Iturria

I am extremely passionate about people, technology and the most effective ways to connect the two by sharing my knowledge and experience. Working collaboratively with customers and partners inspires and excites me, especially when the outcome is noticeable valuable to a business and results in true innovation. I enjoy learning and teaching, as I recognise that this is a critical aspect of remaining at the forefront of technology in the modern era. Over the past 10+ years, I have developed and defined solutions that are reliable, secure and scalable, working closely with a diverse range of stakeholders. I enjoy leading engagements and am very active in the technical communities – both internal and external. I have stood out as a noticeable mentor running technology events across major cities in Australia and New Zealand, including various technology areas such as, Enterprise Integrations, API Management, Cloud Integration, IaaS and PaaS adoption, DevOps, Continuous Integration, Continuous Automation among others. In recent years, I have shaped my role and directed my capabilities towards educating and architecting benefits for customers using Oracle and AWS Cloud technologies. I get especially excited when I am able to position both as a way to exceed my customers’ expectations. I hold a bachelor degree in Computer Science and certifications in Oracle and AWS Solutions Architecture.

One thought on “Teaching how to use NodeJS in your local environment”

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 )

Facebook photo

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

Connecting to %s

%d bloggers like this: