Windows installation Nodejs:
Node Download address: https://nodejs.org/download/Here is the 64bit.msi version.
Custom Installation path: D:\nodejs
To set the global installation save directory:
NPM config set prefix "D:\nodejs\node_global"
NPM config set cache "D:\nodejs\node_cache\" (first built Node_cache directory)
It is then installed directly into the global directory when the dependency is installed using the NPM-G command.
Install Express:
NPM Install-g Express (the default is to install the latest version of Express)
Because the latest version of Express to the bin, so also need to install additional Express-generator
NPM install-g Express-generator
Express version number can also be specified at installation
NPM install-g express@3
or NPM install-g express@3.5.0 (3.* version does not require additional installation express-generator)
If you want to uninstall off, use
NPM uninstall-g Express Command (no version number required)
Check for success after installation:
Express-v (v is uppercase, v somewhat unrecognized)
If you appear
' Express ' isn't recognized as an internal or external command,
Operable program or batch file. Command not recognized
, the environment variables may not be configured well.
Find the directory of Express express.cmd two files in this machine or in your own global installation directory.
Because I previously the global installation directory for D:\nodejs\node_global;
So directly will D:\nodejs\node_global; Add to Path of environment variable:
Save, close the Cmd interface and reopen it:
The installation was successful.