If you want to build a modern web application, you'll likely need NodeJS. In this article, I'll explain how to install NodeJS on Windows, MacOS, and Linux Ubuntu.
Install NodeJS
For Windows and MacOS users, the installation is straightforward, like installing any other application: click, next, next...

You simply need to go to the NodeJS homepage and download it by clicking the large green button that says "LTS (Recommended for Most Users)". LTS stands for Long Time Support. The LTS version is more stable than the version labeled Current and gets the newest features and improvements with longer support compared to non-LTS versions.

Installation on Windows
Installing on Windows is straightforward, like installing any other application. The main thing you need is the NodeJS executable file that you can download from the homepage. Here are the steps required to install NodeJS on Windows:
- Download NodeJS LTS from the homepage
- Once downloaded, double-click the executable file
- Once installed, you can verify it via command prompt (cmd)
- After opening cmd, you can type the following command to check which version is installed on your device:
node --version
# -> v12.9.1
If you want to install NodeJS on WSL, you can follow the Ubuntu installation steps
Installation on MacOS
There are 2 ways to install on MacOS: the first is similar to Windows, and the second is using Homebrew. I recommend using Homebrew as it's easier. Here are the steps if you install using Homebrew:
- Install Homebrew if you don't have it yet. Type this script in your terminal:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
- Once installed, you can verify it by typing this script:
brew -v
# -> Homebrew 2.2.2
- After that, you can type the following command in your terminal:
brew install node
- If the installation is successful, you can verify it in the terminal like this:
node -v
# -> v12.9.1
npm -v
# -> 6.10.2
And you're ready to work with NodeJS on your Mac.
Installation on Ubuntu
For Ubuntu users or WSL Ubuntu on Windows, here are the steps:
- First, you need curl. If you don't have curl, you can type this command in your terminal:
sudo apt-get install curl
- Then add the NodeJS source with the following command:
# setup_12.x where 12 is the NodeJS version. If you want version 14
# You can change it to setup_14.x
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
- After adding the NodeJS source, type the following command to install NodeJS:
sudo apt-get update
sudo apt-get install nodejs
- After installation, you can verify it in the terminal using the following command:
node -v
# -> v12.9.1
npm -v
# -> 6.10.2
Summary
In this article, I've explained how to install NodeJS on Windows, Mac, and Ubuntu. If you want to install NodeJS, it's recommended to choose the LTS version. The LTS version is more stable than other versions and you get the newest features and improvements from NodeJS.
Blog

Learning NodeJS: Understanding Basic Routing in NodeJS
Routing refers to how an application handles requests to different endpoints/URLs from clients/browsers, or how an application responds to client requests to specific endpoints/URLs with specific HTTP request methods like GET, POST, PUT, PATCH, DELETE, and others.

Learning NodeJS: Creating Your Own Web Server with NodeJS
If you've ever created a static HTML website or used PHP or ASP before, you've likely worked with a web server like Apache or IIS that serves static files requested by the browser.
