Node.js is an open source, cross-platform runtime environment for server-side and networking applications.
We will be using Homebrew to install Node.js, Homebrew makes it more easier to install and upgrade Node.js.
Downloading and installing Homebrew (XCode need to be installed)
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
You can install Node.js by entering this command.
brew install node
To check everything is working correctly you can run.
Now you have Node.js installed on your Mac