[Nodejs Installation and Environment configuration under]win System

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.