Installing MongoDB Community Edition with Homebrew (the easy way)

Homebrew is a package manager for Mac (also known as the missing package manager for macOS) and is easy to install. Go to the official website (https://brew.sh), and there you will find a command that you should run to install it, which is as follows:

 /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  1. If you have Homebrew already installed, or if you just installed it, then the first thing you need to do is to update the package database with this command:
    brew update
  1. Now we need to install MongoDB using this command:
    brew install mongodb
  1. If you want to install the latest development version of MongoDB, then you should ...

Get React Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.