Full-Stack Web Development with Vue.js and Node

(singke) #1
Introducing MEVN Chapter 1

Installing Node.js on Linux


For Linux, we can either install the default distribution of Node.js or we can download it


from NodeSource to use the latest version.


Installing Node.js from the default distribution

To install from the default distribution, we can install Node.js on Linux by using this


command:


$ sudo apt-get install -y nodejs

Installing Node.js from NodeSource

To install Node.js from NodeSource, perform the following steps:



  1. First download the latest version of Node.js from NodeSource:


$ curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash


  1. Then, install Node.js with the command:


$ sudo apt-get install -y nodejs

The apt is a short form of Advanced Package Tool that is used to install
software on Debian and Linux distributions. Basically, this is equivalent to
the Homebrew command in macOS.

Installing Node.js on Windows


We can install Node.js on Windows by following these steps:



  1. Download the Node.js installer from the official website (https:/​/​nodejs.​org/
    en/​download/​).

  2. Run the installer and follow the given instructions.

  3. Click on the Close/Finish button.

Free download pdf