Nodejs

nodejs

 * http://nodejs.org/
 * http://www.nodeclipse.org/ - nodeclipse, eclipse plugin for node
 * https://c9.io/lokvin - cloud9 ide

Reding Book

 * Node.js Recipes - Cory Gackenheimer

npm
>sudo npm update -g npm
 * update npm version

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

nvm

 * nvm is node version management tool
 * https://github.com/creationix/nvm

install nvm
git clone https://github.com/creationix/nvm.git ~/.nvm && cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`
 * manual install

. ~/.nvm/nvm.sh
 * you need to source it from your shell, I always add this line to my ~/.bashrc

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.26.1/install.sh | bash
 * shell install

wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.26.1/install.sh | bash

sudo nvm
vi ~/.bashrc . /home/appdev/.nvm/nvm.sh
 * For CentOS 6
 * add nvm.sh to current user .bashrc
 * 1) add below

vi /root/.bashrc . /home/appdev/.nvm/nvm.sh
 * add nvm.sh to root .basrc
 * 1) add below

Defaults   secure_path = + /usr/local/nodejs/nodejs/bin:/usr/local/bin
 * sudo visudo
 * 1) add

vi ~/.bash_profile #add PATH=$PATH:/usr/local/nodejs/nodejs/bin:$HOME/bin alias sudo='sudo env PATH=$PATH:$NVM_BIN'
 * edit current user ~/.bash_profile

nvm help
nvm help
 * nvm usage

nvm list-remote, nvm list
nvm ls-remote
 * list all node version available for download

nvm ls
 * list local version

nvm common command
nvm install 4.1.0
 * install version

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
nvm alias default 0.12.7

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

>npm install -g n
 * n is another node version management

package.json

 * package.json doc