MongoDB shell
If you followed Chapter 1, Introduction to MEAN, you should have a working instance of MongoDB in your local environment. To interact with MongoDB, you'll use the MongoDB shell that you encountered in Chapter 1, Introduction to MEAN. The MongoDB shell is a command-line tool that enables the execution of different operations using a JavaScript syntax query language.
In order to explore the different parts of MongoDB, let's start the MongoDB shell by running the mongo
executable, as follows:
$ mongo
If MongoDB has been properly installed, you should see an output similar to what is shown in the following screenshot:
Notice how the shell is telling you the current shell version, and that it has connected to the default test
database.