From 4cbd8a356c14e3e7923fc17266e31afea03b8f93 Mon Sep 17 00:00:00 2001 From: Igor Shubovych Date: Fri, 25 Dec 2015 15:48:10 +0200 Subject: [PATCH] nvm: add page --- pages/common/nvm.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 pages/common/nvm.md diff --git a/pages/common/nvm.md b/pages/common/nvm.md new file mode 100644 index 000000000..48a7f8396 --- /dev/null +++ b/pages/common/nvm.md @@ -0,0 +1,28 @@ +# nvm + +> Node.js version manager. +> Switch between NodeJS versions: system, node, 0.10, 0.12, 4.2 etc. + +- Install a specific version of NodeJS + +`nvm install {{node_version}}` + +- Use a specific version NodeJS in the current shell + +`nvm use {{node_version}}` + +- Set the default NodeJS version + +`nvm alias default {{node_version}}` + +- List all available NodeJS versions and print the default one + +`nvm list` + +- Run a specific version NodeJS REPL + +`nvm run {{node_version}} --version` + +- Run app in a specific version of NodeJS + +`nvm exec {{node_version}} node {{app.js}}`