Npm
1.NPM is a package management tool that is installed with Nodejs to solve many of the problems in Nodejs code deployment, common usage scenarios are as follows:
- Allows users to download third-party packages written by others from the NPM server for local use.
- Allows users to download and install command-line programs written by others from the NPM server for local use.
- Allows users to upload their own packages or command-line programs to the NPM server for others to use.
Since NPM has been integrated with the new version of Nodejs, NPM has been installed as well.
2.NPM Common commands:
A. View current version number: Npm-v
B. Installation module:npm install ModuleName, (after installation, the corresponding module will be placed under the Node_modules, the code can be directly require introduced),
C. Unload module: NPM Uninstall ModuleName
D. Update module: NPM update modulename
E. Search module: NPM search ModuleName
F. View files in the current directory: NPM ls
G. Getting help: NPM assistance command
H. Release module: NPM publish
3. Create the module:
You need to write a module definition file, Package.json
node. JS Entry Two