[readme] Add quick intro to `nvm`

Allow newbies to get a quick understanding of how `nvm` works right from the start.
Alister Norris 2016-12-06 15:14:08 +00:00 committed by Jordan Harband
parent 7bbc57355d
commit 59b0b3942c
No known key found for this signature in database
GPG Key ID: 9F6A681E35EF8B56
1 changed files with 24 additions and 0 deletions

View File

@ -5,6 +5,7 @@
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
## Table of Contents ## Table of Contents
- [Intro](#intro)
- [About](#about) - [About](#about)
- [Installing and Updating](#installing-and-updating) - [Installing and Updating](#installing-and-updating)
- [Install & Update Script](#install--update-script) - [Install & Update Script](#install--update-script)
@ -55,6 +56,29 @@
<!-- END doctoc generated TOC please keep comment here to allow auto update --> <!-- END doctoc generated TOC please keep comment here to allow auto update -->
## Intro
`nvm` allows you to quickly install and use different versions of node via the command line.
**Example:**
```sh
$ nvm use 16
Now using node v16.9.1 (npm v7.21.1)
$ node -v
v16.9.1
$ nvm use 14
Now using node v14.18.0 (npm v6.14.15)
$ node -v
v14.18.0
$ nvm install 12
Now using node v12.22.6 (npm v6.14.5)
$ node -v
v12.22.6
```
Simple as that!
## About ## About
nvm is a version manager for [node.js](https://nodejs.org/en/), designed to be installed per-user, and invoked per-shell. `nvm` works on any POSIX-compliant shell (sh, dash, ksh, zsh, bash), in particular on these platforms: unix, macOS, and windows WSL. nvm is a version manager for [node.js](https://nodejs.org/en/), designed to be installed per-user, and invoked per-shell. `nvm` works on any POSIX-compliant shell (sh, dash, ksh, zsh, bash), in particular on these platforms: unix, macOS, and windows WSL.