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 |