Node.js Briefing
1. Installation
- First of all, download Node.js (latest version: v6.9.5) from Node.js Offical Website.
For Windows PC, select all components (even include "Add to Path"). - After installation, open the Command Prompt to check if the installation is ok.
input:node -v
output:v6.9.5
C:\Users\LillianSiYin>node -v
v6.9.5
npm
1. Check Installation
- Once the Node.js was installed, the nmp will also be installed. We can check the version of nmp by openning the Command Prompt.
Input:npm -v
Output:3.10.10
C:\Users\LillianSiYin>npm -v
3.10.10
2. Brief Intro
Npm is actually a package management tool of Node.js.
Why do we need a package management tool? Because we developed on Node.js, which may use a lot of other people's JavaScript codes, which already put into a unique package. If we want to use a particular package, each time by name search the official website, download the code, extract, and then use, very troublesome.
So a centralized management tool came into being: we put their development of the module into the npm official website as different packages, if you want to use one of them, you can directly use it by install the npm.