nodejs Edit

Reding Book Edit

  • Node.js Recipes - Cory Gackenheimer

npm Edit

  • update npm version
>sudo npm update -g npm

npm initEdit

  • use npm init wizard for generate package.json
>mkdir node_test
>npm init

nvm Edit

install nvm Edit

  • manual install
git clone ~/.nvm && cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`
    • you need to source it from your shell, I always add this line to my ~/.bashrc
 . ~/.nvm/
  • shell install
curl -o- | bash
wget -qO- | bash

sudo nvm Edit

  • For CentOS 6
  • add to current user .bashrc
vi ~/.bashrc
## add below
. /home/appdev/.nvm/
  • add to root .basrc
vi /root/.bashrc
## add below
. /home/appdev/.nvm/
  • sudo visudo
## add
Defaults    secure_path = + /usr/local/nodejs/nodejs/bin:/usr/local/bin
  • edit current user ~/.bash_profile
vi ~/.bash_profile
alias sudo='sudo env PATH=$PATH:$NVM_BIN'

nvm help Edit

  • nvm usage
nvm help

nvm list-remote , nvm listEdit

  • list all node version available for download
nvm ls-remote
  • list local version
nvm ls

= nvm common command Edit

  • install version
nvm install 4.1.0
nvm uninstall 4.1.0
nvm alias dev 4.1.0
nvm unalias dev
nvm run 4.1.0 app.js
nvm run dev app.js
nvm use 4.1.0

nvm default alias Edit

nvm alias default 0.12.7

nave , n Edit

  • nave is another node version management tool
>npm install -g nave
  • n is another node version management
>npm install -g n

package.json Edit

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.