1.NodeJS Installation
1.windows under the Nodejs installation is more convenient, only need to login official website (http://nodejs.org/), directly click the Download button.
2. The installation process is basically direct "NEXT" (the installation MSI file of Windows will add the system variable of path directly in the process, the variable value is your installation path, for example "C:\Program Files\nodejs").
3. After the installation is complete, you can use CMD to test if the installation is successful.
$ node-v
Installation of 2.NPM
1. Since NPM has been integrated with the new version of Nodejs, NPM has been installed and tested for successful installation.
$ npm-v
2. The conventional Nodejs is now complete, and also in the cmd command line Input "node" into node development mode, enter:
> console.log (' Hello World ');
3. Configure the Node module global path
1. Configure the storage path of the NPM global module and the cache path first.
Create a new "Node_global" and "Node_cache" two folders under Nodejs's home directory.
2. Start cmd
$ npm config set cache "C:\Program files\nodejs\node_cache"
$ npm config set prefix "C:\Program files\nodejs\node_global"
3. Choose Express, the more commonly used module test.
$ npm Install express-g ("-g" This parameter means to be loaded into the global directory).
3. Open the System dialog box, "My Computer" right "properties"-"Advanced system Settings".
3. Enter the Environment Variables dialog box, create a new "Node_path" Under System variables and enter "C:\Program files\nodejs\node_global\node_modules" (PS: This step is quite critical). The user variable "PATH" is modified to "C:\Program files\nodejs\node_global\ "If you do not use the module, it causes the input command to appear" XXX is not an internal or external command, or a program or batch file that can be run "error.
4. Test node's module global path is configured correctly.
$ node
> Require (' Express ')
Ok!
NodeJS, NPM installation configuration steps (Windows version)