Environment: Win7 64+node.js v0.10.33+npm 1.4.28+git Bash (Disclaimer: The following may be different, because this part of me is done in the company, part of it is done at home, but the commands and steps are the same)
1. Install Express
Enter NPM Install-g Express in the console (choose Global installation here)
In the command tool for installing Express, the command tool is split up in the console by entering NPM install-g express-generator "latest express4.0+ version (Project address: https://github.com/ Expressjs/generator) "
Test for installation success: Enter Express--help in the console, as shown below to indicate successful installation
New Express project here, behind the Express, is the project directory Express_example
Enter the Express_example directory, NPM installation, or you can do it together: CD express_example && NPM Install
After installation, you can look at the files and directories under the directory, which is expess by default (can also be changed, but in view of my first contact with the inconvenience of writing on the fear that I write is wrong and mislead everyone)
Startup Project starts on the command line: NPM Start (the latest version of Express requires this startup method, not the node app.js as many books and posts have previously said)
Then enter in the browser: location:3000, enter will see the following interface, representing the success
You can then look back at the console and here is some output from the Console.log in the Express code
This is where my Express entry begins!
node. JS's web Framework Express first attempt!