Introducing MEVN Chapter 1Each document is stored in a JSON-structured format.
Querying and Indexing the MongoDB is very easy.
MongoDB is a free and open source program.Installing MongoDB on macOS
There are two ways to install MongoDB. We can either download it from the official
MongoDB website (https://www.mongodb.org/downloads#production) or we can use
Homebrew to install it.
Installing MongoDB by downloading
- Download the version of MongoDB you want from https://www.mongodb.com/
download-center#production. - Copy the downloaded gzipped to the root folder. Adding it to the root folder will
allow us to use it globally:
$ cd Downloads
$ mv mongodb-osx-x86_64-3.0.7.tgz ~/- Unzip the gzipped file:
$ tar -zxvf mongodb-osx-x86_64-3.0.7.tgz- Create a directory that will be used by Mongo to save data:
$ mkdir -p /data/db- Now, to check if the installation was done successfully, start the Mongo server:
$ ~/mongodb/bin/mongodHere, we have successfully installed and started the mongo server.