install nodejs ubuntu server 18.04 code example
Example 1: install npm ubuntu
sudo apt update
sudo apt install nodejs
sudo apt install npm
Example 2: install nodejs from ubuntu 18.04
sudo bash nodesource_setup.sh
sudo apt update
sudo apt install nodejs
sudo apt install npm
sudo bash nodesource_setup.sh