In the last article we have covered the key features of Node.js. Now, to start building your very first application using Node.js, the first step is to install Node.js framework. The Node.js framework is available for a variety of operating systems right from Windows to Ubuntu and MacOS. Once the framework is installed correctly, you are free to explore the true power of it in building server side applications.
The first step in using Node.js is the installation of the Node.js libraries on the client system. Follow these steps to complete the Node.js installation successfully.
Step 1: Downloading the Node.js Installer
Go to https://nodejs.org/en/download/ and download the necessary binaries.
I am using a MacBook Air while writing this book, So I am going to download the latest Node.js installer for macOS. If you are on a windows machine, you can download the Windows installer as well. Make sure you download the correct installer for your system architecture. For example, if you have a 64bit system, download the 64bit installer.
Step 2: Run the Installer
Double Click on the installer you have downloaded. If you are on a Mac, it will bring up the installation window directly. On a windows computer, click on the .msi file you have downloaded. When prompted for additional permissions, click on the run button.
Step 3: Install Node.js
In the next step, click on the continue button to move the installation step forward.
Step 4: Reading the Software License Agreement
In the next step, read the software license agreement carefully. Generally, we skip this step. But it is highly recommended to read the agreement.
Step 5: Choose the installation location for Node.js
Choose the installation location for Node.js. If you are not sure about it, I would recommend you to leave it as it is. Then click on Install.
Step 6: Some extra steps for MacBooks
It will ask you to enter administrative password of your system. It is an extra bit of security in MacOS to prevent unauthorised software installation. So, enter your password and click Install Software.
Step 7: Finished Installing Node.js
It will take a few minutes for the Node.js installation to complete. In the next screen, once the installation is complete click on the close button.
Once you have completed all the above mentioned steps, you have successfully installed Node.js on your system. In the next article we will cover how to install Node.js using the Node Package Manager.