node-rest-api-starter

Installation of Node.js

First thing we need to do is to install nodejs, you can find the installation steps and archives from the official website here. It is recommended to use the LTS version of node to avoid any kind of interruptions.

Install specific version using CURL

  1. Install curl
sudo apt update
sudo apt upgrade
sudo apt install curl
  1. Get nodejs PPA Switch to root directory
cd ~
curl -sL https://deb.nodesource.com/setup_12.x -o nodesource_setup.sh
  1. Run the script under sudo:
sudo bash nodesource_setup.sh
  1. Install nodejs
sudo apt install nodejs
  1. In order for some npm packages to work (those that require compiling code from source, for example), you will need to install the build-essential package:
sudo apt install build-essential