Express launched a few days ago 4.0, learned that the news, I tried a bit, suddenly found that the previous documents on the operation of a variety of problems. The result is only to see the document, now in this to share the next 4.0 version of the installation.
First, if you need to use the Express 3.x version, directly using the @ character in the NMP to determine the version, the instructions are as follows:
NPM install-g [email protected]
If you need to use 4.0, here's a question to be aware of in version 4.x Express has separated the command line tool (link https://github.com/expressjs/generator)
We now have a global installation that only needs to install this command-line tool, and the instructions are as follows:
NPM install-g Express-generator
We then set out to install the Express framework, with the following instructions:
(blog is the folder name of the installation)
(Install Express and dependent)
(It is important to note that the Express 4.x cannot start with node app.js, but instead uses the command NPM start as the boot)
Visit Http://localhost:3000/to see the familiar welcome to Express, proving that the installation was successful.
Then we can try out the new features of 4.0.
Reprinted from: http://www.cnblogs.com/moonpanda/p/3669735.html
[Reprint]node.js Express 4.x Installation Guide, no automatic configuration of environment variable issues