When installing express, you need to choose Local mode or global mode, first look at the difference between local mode and global mode:
1. Local mode: NPM install [package_name];
Global mode: NPM [install/i]-G [Package_name]
The difference between the two commands is only that the global mode commands are more-G. Local mode installation does not use Express on the command line because the environment variable is not configured in this mode. If you use global mode, NPM installs the package into the system directory, such as/usr/local/lib/node_modules/, and the files contained in the Bin field in the Package.json file are linked to/usr/local/bin/. /usr/local/bin/is defined by default in the PATH environment variable, so you can run the Supervisor script.js command directly from the command line.
2. Installing in global mode may still not be able to command line direct use Express, because the express default installation is the latest version, is already a 4.x.x version. The command tools are separated from the latest express4.0+ version, so express-generator must be installed.
Perform:
NPM Install Express-generator
After installing the C:\Users\ColdCoder\node_modules, you will find that there is a. bin directory, after which there is a express.cmd file.
After the system environment variable path, add: C:\Users\ColdCoder\node_modules\.bin
This allows you to use express commands directly from the command line.