1. Download the node. JS official Windows Edition program:
http://nodejs.org/#download
Starting with 0.6.1, node. JS provides two installation options on the Windows platform, the. msi installation file, and an. exe executable file.
I have chosen. EXE file. Because. In addition to copying Node.exe to the C:\Program file (x86) \ Directory and modifying the system path, the MSI installation file does not see any other effect.
I am using a version of 0.6.2:http://nodejs.org/dist/v0.6.2/node.exe
2. Create the D:\nodejs directory and save the Node.exe in this directory. The "D:\nodejs" is added to the system environment variable path, allowing the node application to be executed at any location.
3. Download the NPM source code:
Https://github.com/isaacs/npm/tags
It is important to note that the latest version of NPM in this article is 1.0.106, but this latest version and 1.0.105 are problematic under the Windows platform. So I chose to install the 1.0.104 Version:
https://github.com/isaacs/npm/zipball/v1.0.104
4. Extract the NPM source code into the D:\NPMJS directory.
Complete the installation of NPM by performing the following actions in the Command Prompt window:
D:\>CD NPMJS
D:\npmjs>node Cli.js INSTALL-GF
Other than that:
Node Cli.js install NPM-GF//The latest version of NPM can be installed
node Cli.js install [email protected]-GF//Can install the specified version of NPM
Both of these methods are downloaded and installed from the code base through the network, but the codebase generally retains only the last two versions.
5. After the NPM installation is complete, add "D:\nodejs\node_modules" to the system environment variable Node_path.
6. Install Express:
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.
Installing node. js and NPM module management on the Windows platform