2. Install Node for
Development
Mac OS X with Homebrew
brew search node
brew install node
Ubuntu from package manager
sudo apt-get install nodejs npm
CentOS from package manager
yum install nodejs npm
3. Install Node for
Development
Node.js on Microsoft Windows with Chocolatey Gallery[1]
Powershell and .NET framework 4.0 in Windows machine
Install Chocolatey Gallery
@powershell -NoProfile -ExecutionPolicy unrestricted -Command
"iex ((new-object net.webclient).DownloadString('https://
chocolatey.org/install.ps1'))" && SET PATH=%PATH%;
%ALLUSERSPROFILE%chocolateybin
Install Node.js and NPM
choco install nodejs
4. Node commands
Check node version
node --version
Check Google V8 and OpenSSL version
node -e "console.log(process.versions)"
!
6. nvm
Setup nvm
npm install -g nvm
Install node version
npm install 0.10.29
Use the specific node version
npm use 0.10.29
Disable node version
npm deactivate
7. nodist
Setup nodist
cinst nodist -Pre
Install node version[2][3]
nodist add 0.10.29
Use the specific node version
nodist 0.10.29
8. Install Native module on
Windows
Some Node modules are written with C
or C++, meaning they must be compiled
to native code
This is handled automatically by npm and
it will use node-gyp to compile to native
code, and to do so node-gyp depends on
a compiler toolchain that includes Python
2.7 and a C/C++ compiler.
Reference: https://github.com/TooTallNate/node-gyp#installation
9. Install Native module on
Windows 7
Install Python 2.7
choco install python2
Install Microsoft Visual Studio 2010 Express
Download Link
Install node-gyp
npm install -g node-gyp
10. Node Package Manager
Install package in global scope
npm install -g express
Install package in local scope
npm install underscore
11. Start Node in system
startup
forever package
Install forever
npm install -g forever
12. Reference
[1]Chocolatey Gallery, http://
chocolatey.org/
[2]Nodist â Node version manager for
Windows, http://thechangelog.com/nodist-node-
version-manager-for-windows/
[3]nodist, https://github.com/marcelklehr/
nodist#readme