How it works...

MongoDB runs as a process on your local file system. By default, it stores files in /data/db. This process must be running in order for you to read or write any content from MongoDB. In the coming sections of this book, it's important to make sure you are running the process. One easy way to make sure that MongoDB is always running is to create a process daemon to run in the background. You can create such a daemon using the following command on Mac OS:

mongod --fork --logpath /var/log/mongodb.log

This starts the a MongoDB process, and logs all its events to a log file on your machine.

The mongo command activates a special MongoDB shell that you can use to send commands to your MongoDB process. Following are the most common types of commands you will run in the mongo shell.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.14.8.206