This article transferred from: http://www.cnblogs.com/linjiqin/p/3765390.html
The first step: Download the installation file download Nodejs, official website: http://nodejs.org/download/, I download here is Node-v0.10.28-x86.msi, such as:
Step Two: After the installation nodejs download is complete, double-click "Node-v0.10.28-x86.msi" to start the installation of Nodejs, custom installation under D:\dev\nodejs.
In the cmd console input: node-v, the console will print out: v0.10.28, the version prompt indicates that the installation was successful. This boot step installs the Node.exe file into the D:\dev\nodejs\ directory and adds the directory to the PATH environment variable.
Step three: NPM installation since NPM has been integrated with the new version of Nodejs, NPM has been installed as well. You can also use the cmd command line to enter "Npm-v" to test for successful installation. For example, a version prompt indicates that the installation was successful.
Fourth step: Install the relevant environment
NPM Install Express-g NPM install jade-gnpm install mysql-g
By default, the above components are installed under the D:\dev\nodejs\node_modules folder, which is also the auto-find path for NODEJS related components.
Fifth Step: Install Coffeescript
NPM Install Coffee-script-g
Confirm the installation of the command: COFFEE-V, the version number that appears indicates a successful installation.
Sixth step: Coffeescript Test instance new Cs.js file, enter:
In [0...5]console.log "Hello #{i}"
Run the "coffee cs.js" output in this directory:
d:\>Coffee Cs.jshello 0Hello 1Hello 2Hello 3Hello 4
The above environment is basically configured to complete.
Add-on: All commands are globally installed, so the installation package is installed under the current user and can be accessed in all other areas of the disk, compared. Otherwise, it is installed in the current directory and can only be used in the current directory.
Install the Express issue after installing the Nodejs installation package, after installing Express via NPM, the express prompt "Express" is not an internal or external command, because of the version issue, the current version is 4.0.0, changed to 3.5.0 to run. $ NPM install-g [email protected]
The global installation is under the C:\USERS\XDSKG\APPDATA\ROAMING\NPM directory.
[Nodejs Installation and Environment configuration under]win System