Tech Demo | Set up MongoDB

1. Install MongoDB

Download and install MongoDB. In this tech demo we’ll install it the default folder:

C:/Program Files/MongoDB/Server4.4/bin/

We’ll use this folder as our base folder for the techdemo


Create a script to launch MongoDB. Call it run-mongo.bat and store it in the above folder. This is the script contents.

C:/Program Files/MongoDB/Server4.4/bin/mongod --dbpath=c:/files/techdemo/data

Run it to make sure it works.

2. Create a Tech demo database

Run MongoDB Compass. This is one of the apps distributed with MongoDB in the MongoDB download

 Connect to the MongoDB server. Click CONNECT




Enter ‘techdemo-orders’ in the Database Name field, and ‘orders’ in the Collection Name field. If you haven’t used MongoDB, then a collection is like a table in a SQL database.


Do this again, but use ‘techdemo-warehouse’, and ‘stock’ to create another database and collection.

Next step … Set up Ruby