Working with the Mongo shell

Whenever we start using MongoDB, the first thing we should do is play with it for a while. Looking for available databases, collections, documents, and so on can be done with a simple tool called Mongo shell. This shell is packaged along with the installation steps we mentioned in the preceding section. We need to launch it using the following command:

mongo

Refer to the following screenshot:

 

If you see this screen, everything worked fine. If you are getting any errors, the server is not running or there is some other issue. For troubleshooting, you can look at the official MongoDB troubleshooting guide at https://docs.mongodb.com/manual/faq/diagnostics ...

Get Building RESTful Web services with Go 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.