The first step in creating a project to install node.js, why should install node? Why npm?

First, why install node.js

Node.js is because npm package management tool (package manager), npm based applications node.js

 

Second, why use npm package management tool

Why do we need a package management tool? Because we develop on Node.js, we will use a lot of JavaScript code written by someone else. If we want to use a package written by someone else, always searching by name at the official website, download the code, extract, re-use, very cumbersome. So a centralized management tool emerged: put npm official website after everyone had put their own developed modules package, if you want to use, directly through npm installation can be directly used, there is no managed code which should be where to download.

More importantly, if we want to use modules A, and module A turn depends on module B, module B in turn depends on module X and module Y, npm according dependencies, all dependent packages are downloaded and manage. Otherwise, manually manage on our own, certainly cumbersome and error-prone.

 

Third, the installation went node.js

https://nodejs.org/en/download/   official website of the installation, Windows installation (.msi) because

MSI is microsoft installer shorthand format is Microsoft installation package. Normally, it is a software program.

LTS is a long time to maintain a version of the installation package --- install this

CURRENT is the latest installation package

 

node -v view the current version node

npm npm -v view the current version

 

Simply put Node.js is running on the server side JavaScript.

Node.js is a platform based on a built Chrome JavaScript run-time. (Note: Node.js is a platform, not a language)

Node.js is a non-blocking, event-driven I / O server-side JavaScript environment, based on Google's V8 engine, the V8 Javascript execution speed is very fast, very good performance.

Under explain non-blocking and event-driven

Event-driven: the server only when a user event occurs when there have only response

Non-blocking: Node.js application is developed by javascript, then run directly on Google's metamorphosis V8 engine. Use Node.js, you do not have to worry about the client's request will be running in the server for some can cause obstruction of code.

 

First, why install node.js

Node.js is because npm package management tool (package manager), npm based applications node.js

 

Second, why use npm package management tool

Why do we need a package management tool? Because we develop on Node.js, we will use a lot of JavaScript code written by someone else. If we want to use a package written by someone else, always searching by name at the official website, download the code, extract, re-use, very cumbersome. So a centralized management tool emerged: put npm official website after everyone had put their own developed modules package, if you want to use, directly through npm installation can be directly used, there is no managed code which should be where to download.

More importantly, if we want to use modules A, and module A turn depends on module B, module B in turn depends on module X and module Y, npm according dependencies, all dependent packages are downloaded and manage. Otherwise, manually manage on our own, certainly cumbersome and error-prone.

 

Third, the installation went node.js

https://nodejs.org/en/download/   official website of the installation, Windows installation (.msi) because

MSI is microsoft installer shorthand format is Microsoft installation package. Normally, it is a software program.

LTS is a long time to maintain a version of the installation package --- install this

CURRENT is the latest installation package

 

node -v view the current version node

npm npm -v view the current version

 

Simply put Node.js is running on the server side JavaScript.

Node.js is a platform based on a built Chrome JavaScript run-time. (Note: Node.js is a platform, not a language)

Node.js is a non-blocking, event-driven I / O server-side JavaScript environment, based on Google's V8 engine, the V8 Javascript execution speed is very fast, very good performance.

Under explain non-blocking and event-driven

Event-driven: the server only when a user event occurs when there have only response

Non-blocking: Node.js application is developed by javascript, then run directly on Google's metamorphosis V8 engine. Use Node.js, you do not have to worry about the client's request will be running in the server for some can cause obstruction of code.

 

Guess you like

Origin www.cnblogs.com/qdwz/p/12467678.html