How-to
    How To Add Google AdSense To Your Website
    How To Download Canvas as an image
    How To Embed Youtube Videos
    How To Host NodeJS Apps
    How To Host Static Websites On Amazon AWS EC2
    How To Host Static Websites On Amazon AWS S3
    How To Host Static Websites On GCP Cloud Storage
    How To Install Node.js
    How to Speed Up IntelliJ IDEA / Clion
    How to safely store API Keys

How To Install Node.js

Updated: 2022-02-21

Install Node.js

Install node.js on Ubuntu

$ curl -sL https://deb.nodesource.com/setup_10.x | sudo bash -
$ sudo apt-get install -y nodejs

Install npm

$ sudo apt-get install npm

Upgrade Node

Upgrade node and npm:

$ npm install -g node
$ npm install -g npm

Or use n:

sudo npm cache clean -f
sudo npm install -g n

# install stable version
sudo n stable

# install latest version
sudo n latest

sudo ln -sf /usr/local/n/versions/node/<VERSION>/bin/node /usr/bin/node