NPM is the official package management tool from node. js for publishing, propagating, and relying on control of node. JS Packages
Install Express ==>, a popular web development framework based on node. JS, that allows you to quickly build a full-featured website.
$ NPM Install Express
Release of the package to create a Package.json file that complies with the NPM specification
$ NPM Init
When you enter a command, a Package.json file is generated
Package Name: (byvoidmodule) Alanversion: (1.0.0) 0.0.1description: Wu Tao first npm Pack entry point: (index.js) Test command:git Repository:keywords:author: Wu Tao License: (ISC) about-to-write to g:\nodejs\byvoidmodule\package.json:{ "name": "Alan ", " version ":" 0.0.1 ", " description ":" Wu Tao first npm package ", " main ":" Index.js ", " scripts ": { " test ":" echo \ "Error:no test specified\" && exit 1 " }, " author ":" Wu Tao ", " license ":" ISC "}
This generates a Package.json file in the Byvoidmodule directory that complies with the NPM specification. Create a index.js as the interface of the package, a simple package is finished. Before the release, we also need to obtain an account for future maintenance of their own packages, using NPM AddUser according to the prompts to enter the user name, password, mailbox, waiting for account creation to complete. When you're done, you can use the NPM WhoAmI quiz to see if you've got your account. Next, run NPM publish in the directory where the Package.json is located, and wait a few moments to complete the release. Open your browser and visit http://search.npmjs.org/to find the package you just released. Now we can install it using the NPM install Byvoidmodule command on any computer in the world.
9.node.js Package Manager NPM