> mkdir capstone
> cd capstone
# inside the ./capstone directory
> py -m venv venv
> venv\Scripts\activate
Note - The py -m venv venv
command may be different for you. It could be py -3 -m venv venv
or python -m venv venv
# inside the ./capstone directory
> git init
> git clone https://github.com/marajput123/WeSource-backend.git
> pip install -r requirements.txt
Note - Be under the root directory (./WeSource-backend)
Create users from the ./data/users.json file
> db_populate_script.py cu
Create products from the ./data/products.json file
> db_populate_script.py cp
Create products from the ./data/group.json file
> db_populate_script.py cg
Create products from the ./data/review.json file
> db_populate_script.py cr
Create mulitple collections from the ./data folder
# Create User collection and Product collection
> db_populateScript.py cu cp
# Create Group collection and Review collection
> db_populateScript.py cg cr
# Create all collections
> db_populate_script.py cu cp cg cr
Dropping collections from the databse
# Drop User collection
> db_populateScript.py du
# Drop Product collection
> db_populateScript.py dp
# Drop Group collection
> db_populateScript.py dg
# Drop Review collection
> db_populateScript.py dr
# Drop all collections
> db_populate_script.py delete_all
Reference - Flask Installation Guide
If there are errors in this .md file, please update. Thank you!