node. JS is a running environment for JavaScript and is an encapsulation of the Google V8 engine. is a server-side JavaScript interpreter.
Include relationship:
Nodejs contains NPM, for example you install Nodejs, you open cmd input npm-v will find NPM version number, stating that NPM has been installed.
Summary of the Great God:
In fact, NPM is Nodejs's package manager. When we developed on node. JS, we used a lot of JavaScript code that someone else had written,
If every time we need someone else's code, all search by name, download source, unzip, then use, will be very troublesome.
Then there is the guarantee manager NPM:
Everyone to write their own source code to the NPM online, if you want to use some or some, directly through the NPM installation can be, do not care where the source code.
And if we're going to use Module A, and module A is dependent on module B, and Module B is dependent on modules C and D, then NPM will
Download all dependent packages and manage them. Imagine how troublesome it would be to do all this work on our own!
Nodejs and NPM's relationship "turn"