Set up Node.js Environment on macOS

Install Node

  1. Install NVM (Node Version Manager)
touch ~/.bash_profile

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash

2. Verify install

nvm --version

3. Install Node on Mac

nvm ls-remote

nvm install 16.13.0

4. Verify install

node -v

Install MondoDB

  1. Install Xcode Command-Line Tools
xcode-select --install

2. Install Homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

3. Install MondoDB Community Edition

brew tap mongodb/brew

brew install mongodb-community@5.0

4. Start/Stop MondoDB

brew services start mongodb-community@5.0

brew services stop mongodb-community@5.0

Credits:
https://www.codementor.io/@mercurial/how-to-install-node-js-on-macos-sierra-mphz41ekk

https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/

Leave a Reply

Your email address will not be published. Required fields are marked *