nvm setup mac code example
Example 1: install nvm with brew
brew update
brew install nvm
mkdir ~/.nvm
export NVM_DIR=~/.nvm
source $(brew --prefix nvm)/nvm.sh
Example 2: how to install nvm in mac
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash