Creating and reading data

To do this, we'll open up a second Command Prompt window and navigate into that same bin directory using cd/Program Files/MongoDB/Server/3.2/bin. From here, we'll run mongo.exe. Note that we're not running the mongod command; we're running mongo.exe. This will connect to our local MongoDB database, and it will put us in sort of a Command Prompt view of our database. We'll be able to issue various Mongo commands to manipulate the data, kind of like we can run Node from Command Prompt to run various JavaScript statements right inside the console. When we run this, we're going to connect to the database. Over in the first console window, you can see that connection accepted shows up. We do have a new connection. In ...

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.