I. Installing node. js
Download node. js and place it in the right place
Second, modify the environment variables
Add the node execution path to the system's environment variable path, adding "C:\Program files\node\" at the end of the value of the path variable;
Third, verify node installation
Open the command line, enter node, the description succeeds
Iv. Download the decompression npm1. Download NPM
Select Zip Package, Address: https://github.com/npm/npm/tags
2. NPM's Compression pack
3. Unzip the NPM package
V. Installation of NPM
Enter the root directory of the NPM package
and execute the Command "node Cli.js install NPM-GF"
Many more files after execution, including the executable NPM
VI. Test NPM Installation
Vii. installation of Express
Execute command "NPM install Express-g"
The directory after execution
More express catalogs are available in the Node_modules directory.
Attention:
Unable to execute express command after execution because there is no express command in the node root directory
Installation of Executable Express
Reference https://www.npmjs.com/package/express
Execute command "NPM install-g [email protected]"
The node root directory after execution
Nine, verify Express installation
Enter "Express-v" (note that the upper case is V)
Ten, Test Express1. New Express Project
Create a new Express-test folder on the desktop
Use the CD command to enter, execute the command "express./"
2. After the execution of the directory
3. Add dependencies for the project
Specific dependency configuration in Package.json
Execute command "NPM install"
4. Start the project
Execute command "NPM start"
5. Test whether the project is started
Enter the address "localhost:3000" in the viewer and see as shown in the instructions to start successfully
6. Changes to the console
NPM installation and use of the Express framework