nvm facilitates switching between different Node versions across projects. This post covers its overview from installation to version management.
Installation
To install nvm, execute the following commands in your terminal. This example uses zsh, but the process is similar for other shells like bash.
source ~/.zshrc
Version management
Install the specific version. Including the v prefix is optional.
Install the latest version
Install the latest one for the specified major version
Switch to a specific installed version
Add .nvmrc file inside the project directory and run nvm use command to use the specified installed version.
Get the list of locally installed versions
Get the list of available versions for installation
Boilerplate
Here is the link to the template I use for the development.