While I have heard of Node.js for a long time and recognize it as a force on the web technology front, I have just now set it up and tried it out. I am pretty jazzed about it as a way to provide web apps in a pretty economical way. I suspect it is far more than just that, but my initial experience is the simple apps provided as examples.
I hope this will get you to try out Node.js if you are new to it because I think it is going to be exploding in importance… remember when JQuery was just some little slick new library of functions?
Without providing the step by step instructions to install and set up Node.js I’ll run through the steps and provide the links to the detailed instructions.
My server is Ubuntu 16.04
I’ve installed Node 6.9.4, the current LTS stable version. There is a current version, 7.4.0 which you can use as well if you like living la vida loca.
The link for the installation instructions on Ubuntu 16.04 is here. There are three ways to install Node.js described; I used the last one, Using NVM, that is a bit more complicated, but provides more flexible usage.
Once Node.js is installed, head over to the Docs on the Node.js site and do the example. I made a Dev directory under my home directory to house the scripts; that’s where I put my Example.js. Play with the parameters and see how it works. Also, I made an Example2.js on another port to see if I could run two concurrently… I’ll let you try that for yourself to see!