Skip to content

Tutorial Create and Read From DB

Ardaglash edited this page Apr 6, 2021 · 9 revisions

This continues from part 2 of the tutorial track

Part III - Create our DB and read stuff from it

Step 1 – Install MongoDB

Note: This should already have been done in part 0 and part1 of the tutorial track

Step 2 – Run mongod and mongo

Create C:/data/db (or D:/data/db, if your project folder is on a different drive)

Open a command prompt or shell into that directory, and run mongodb

C:/data/db

mongod

You'll see the Mongo server start up. This is going to take a while if it's the first time, because it has to do some preallocating of space and a few other housekeeping tasks. Once it says "[initandlisten] waiting for connections on port 27017", you're good. There's nothing more to do here; the server is running. Now you need to go back to your original command prompt and type: