Node.js is extremly simple to install on all OS platforms. On Windows there is an installer, which guides you through the setup process. For Ubuntu users simply type the following command.
sudo apt-get install nodejs
Once the process has completed, you can verify, if Node.js is installed correctly by typing the following command.
Node Packager Manager (npm) is installed by default when you install Node.js. You can verify if npm is installed by typing the following command.
Now that Node.js is installed, you can write your first program. Open a text editor and write the famous Hello World program. Save the file as app.js.
To execute the code, cd into the directory where app.js is located in a terminal or command prompt and type the following command.
You should now see Hello World printed to the terminal. This example doesnt demonstrate a lot but in the next few articles you'll become to relaise just how powerful Node.js is.