Node. js is primarily used for non-blocking, event-driven servers, due to its single-threaded nature. It's used for traditional web sites and back-end API services like web App or Mobile App. But it was developed with real-time, push-based architectures in mind. Node is useful for developing applications that require a persistent connection from the browser to the server and is often used for real-time applications such as chat, news feeds and web push notifications.

Install Nodejs 

$ sudo apt-get install curl python-software-properties 
$ curl -sL | sudo -E bash - 
$ sudo apt-get install nodejs 
$ sudo apt-get install npm 

Install nvm (Node Version Manager):

Install nvm on your machine. It will get you into the latest version of the software.
$ curl -o-

The above command install the nvm.
$ nvm list-remote

 The above command list out the versions of Node are available.     v16.10.0

v16.13.0   (LTS: Gallium)
v16.13.1   (LTS: Gallium)
v16.13.2   (LTS: Gallium)
v16.14.0   (LTS: Gallium)
v16.14.1   (LTS: Gallium)
v16.14.2   (Latest LTS: Gallium)

From the list install the latest version of the Node. To install the Long Term Version (LTS release) use the following command
$ sudo nvm install lts/gallium

To verify the version of Node, use the following command
$ sudo node -v