Fetching todos in Robomongo file

Now, we're going to create a new file based off of mongodb-connect. In this new file, instead of inserting records, we'll fetch records from the database. I'm going to create a duplicate, calling this new file mongodb-find, because find is the method we're going to use to query that database. Next, we can go ahead and remove all of the commented-out code that currently inserts records. Let's get started by trying to fetch all of the Todos out of our Todos collection. Now, if I head over to Robomongo and open up the Todos collection, we have just one record:

In order to make this querying a little more interesting, ...

Get Advanced Node.js Development 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.