node. JS Entry Two

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.