Home > Article > Web Front-end > what is nodejs and npm
nodejs is a JavaScript running environment based on the Chrome V8 engine. It is a development platform that allows JavaScript to run on the server. npm, which means "node package manager" in Chinese, is Nodejs's default software package management system written in JavaScript.
The operating environment of this tutorial: windows7 system, nodejs 12.19.0&&npm version 6.14.8, Dell G3 computer.
What is nodejs?
Node.js was released in May 2009 and was developed by Ryan Dahl. It is a JavaScript running environment based on the Chrome V8 engine. It is a development platform that allows JavaScript to run on the server side and uses an event. The driven and non-blocking I/O model allows JavaScript to run on the server-side development platform, which makes JavaScript a scripting language on par with server-side languages such as PHP, Python, Perl, and Ruby.
Node.js optimizes some special use cases and provides alternative APIs to make V8 run better in non-browser environments. The V8 engine executes Javascript very quickly and has very good performance. It is based on Chrome JavaScript The platform established at runtime is used to easily build network applications with fast response speed and easy expansion.
What is npm?
npm (full name Node Package Manager, "node package manager") is Nodejs's default software package management system written in JavaScript. npm can be used to install, share, distribute code, and manage project dependencies.
npm is a package management tool in the JavaScript world, and is the default package management tool for the Node.js platform, which will be installed along with Nodejs. Similar to maven, gradle in Java syntax, and pip in python.
npm can solve many problems in NodeJS code deployment. Common usage scenarios include the following:
Allow users to download third-party packages written by others from the NPM server Use it locally.
Allows users to download and install command line programs written by others from the NPM server for local use.
Allows users to upload packages or command line programs they write to the NPM server for others to use.
npm coexists with Nodejs. As long as Nodejs is installed, npm will also be installed. After Nodejs is installed. Open the terminal and execute the following command to check whether the installation is successful.
[Recommended study: "nodejs tutorial"]
The above is the detailed content of what is nodejs and npm. For more information, please follow other related articles on the PHP Chinese website!