Skip to content

Latest commit

 

History

History
52 lines (33 loc) · 1.55 KB

Setting up Database.md

File metadata and controls

52 lines (33 loc) · 1.55 KB

Guide to Setup up mock data in MongoDB (DEPRECATED)

The dump data is not upto date. Use the following command instead

curl -X GET http://localhost:5000/api/seed-data

For windows you can also follow this video guide to set up MongoDB

For mac you can also follow this video guide to set up MongoDB

Brew commands for installing mongo.

  1. Download MongoDB-community server, MongoDB toolkit & MongoDB-Compass.

  2. Set up Path Enviroment Variables for mongo and mongo-toolkit.

    Default directory location of mongo-server & mongo-tools

    C:\Program Files\MongoDB\Server\5.0\bin

    C:\Program Files\MongoDB\Tools\100\bin

    To check if path variables are correctly setup, run

    mongo
    mongorestore

    If you get command not found, the path variables are not setup correctly, (try restarting once before doing any further debugging after checking the path variables are correctly set.)

  3. Restore database from dump files

    mongorestore --db {db-name} {dump_file_location}
    
    mongorestore --db Vita ./mock-data/dump