2015-12-25 13:48:10 +00:00
|
|
|
# nvm
|
|
|
|
|
|
|
|
> Node.js version manager.
|
|
|
|
> Switch between NodeJS versions: system, node, 0.10, 0.12, 4.2 etc.
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Install a specific version of NodeJS:
|
2015-12-25 13:48:10 +00:00
|
|
|
|
|
|
|
`nvm install {{node_version}}`
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Use a specific version NodeJS in the current shell:
|
2015-12-25 13:48:10 +00:00
|
|
|
|
|
|
|
`nvm use {{node_version}}`
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Set the default NodeJS version:
|
2015-12-25 13:48:10 +00:00
|
|
|
|
|
|
|
`nvm alias default {{node_version}}`
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- List all available NodeJS versions and print the default one:
|
2015-12-25 13:48:10 +00:00
|
|
|
|
|
|
|
`nvm list`
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Run a specific version NodeJS REPL:
|
2015-12-25 13:48:10 +00:00
|
|
|
|
|
|
|
`nvm run {{node_version}} --version`
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Run app in a specific version of NodeJS:
|
2015-12-25 13:48:10 +00:00
|
|
|
|
|
|
|
`nvm exec {{node_version}} node {{app.js}}`
|