How to build a Nodejs environment quickly under Mac OS X

Source: Internet
Author: User
Tags git clone

This is the use of Debian to build Nodejs do records, was written in ~/.BASHRC, Mac default will not load BASHRC, so directly written in Bash_profile.

Mac if you want to automatically load BASHRC, refer to Debian's add the following code in Bash_profile:

The code is as follows Copy Code

If [f ~/.BASHRC]; Then
SOURCE ~/.BASHRC
Fi


Can directly ignore the above words, in the terminal input below the OK ~

The code is as follows Copy Code
git clone git:/ /github.com/creationix/nvm.git ~/.NVM
Echo. ~/.nvm/nvm.sh ">> ~/.bash_profile # Load NVM
        source ~/.bash_ Profile
Nvm install v0.10 0.10.xx's latest edition, nodejs.org/#download view the latest version
NVM alias default 0.10 # Add to environment variable
Echo ' Expo RT node_path= "' $ (npm root-g) '" ' >> ~/.bash_profile # Node_path
        SOURCE ~/.bash_profile
        echo $NODE _path
node-v
nvm ls
# NPM No The DEJS version has been integrated without separate installation.
NPM Install EXPRESS-GD # Express
        express-v
npm Install Uglify-js -GD #uglifyjs
        uglifyjs-v
Related Article

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.