Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
1 of 12

Ch2.setup.node.and.npm

1

Share

Download to read offline

Node install in Mac, Linux and Windows and learn nom

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

Ch2.setup.node.and.npm

  1. 1. Setup Node and npm Rick Chang
  2. 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. 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. 4. Node commands Check node version node --version Check Google V8 and OpenSSL version node -e "console.log(process.versions)" !
  5. 5. Node Version Manager Mac OS X, Linux-based OS nvm Microsoft Windows nodist
  6. 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. 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. 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. 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. 10. Node Package Manager Install package in global scope npm install -g express Install package in local scope npm install underscore
  11. 11. Start Node in system startup forever package Install forever npm install -g forever
  12. 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

×