Installation steps
1, install Nodejs, such as installed in E:\nodejs.
Ensure that there are two environment variables
User environment variable: C:\USERS\ADMINISTRATOR\APPDATA\ROAMING\NPM
System Environment variables: E:\nodejs
2, installation Express, with stable version of 3.5.0, the online information is mostly based on this version, do not specify the version, the default installation of the latest version
Run cmd, npm install-g [email protected]
If it is 4. x version, then install NPM install-g express-generator
3, express installation successfully, you can use the command line to create a test app
Run cmd, express MyApp
4. Copy the dependent module to the root directory of MyApp,
Can be copied manually: Copy the Express directory below C:\Users\Administrator\AppData\Roaming\npm\node_modules to the app root directory
You can also execute commands: cmd, CD e:\nodejs\myapp->npm install
5. Install the template engine jade, install Jade to the currently created app below
Run cmd, cd E:\nodejs\myapp, NPM install Jade
6. Start MyApp, default url:http://localhost:3000
Run cmd, cd e:\nodejs\myqpp, NPM Start or node app.js
7, in the browser access http://localhost:3000, display the Welcome page