Skip to content

Instantly share code, notes, and snippets.

@hattmarris
Last active April 25, 2016 18:01
Show Gist options
  • Save hattmarris/c10b40f6061d90e51683 to your computer and use it in GitHub Desktop.
Save hattmarris/c10b40f6061d90e51683 to your computer and use it in GitHub Desktop.
Nodejs
# nvm - node version manager
$ nvm use 0.0.1 # select 0.0.1 from installed version
$ nvm ls # list versions installed
$ nvm ls-remote # list versions available
$ nvm alias default 0.0.1 # set 0.0.1 version as default
$ nvm use default
$ nvm help
# node - node js package (nodejs ubuntu 14.04)
$ node -v # show version
$ node -e "console.log('hello world from node.js')" # hello world (terminal)
# npm - node package manager
$ npm install express
$ npm install -g express # install globally to:
# ~/.nvm/node_version/lib/node_modules/package_name
$ npm link express # link global express to local project
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment