- Install dependencies.
python -m venv env
source env/bin/activate
pip install requirements.txt- Create new MongoDB database using the Mongo Console or MongoDB Compass with
breadand keep the initial collection name asusersandsticks - Create an admin user
use bread db.createUser({ user: "myUserName", pwd: passwordPrompt(), roles: [ { role: "readWrite", db: "bread" }, { role: "read", db: "reporting" } ] })
- Create a file
keys/mongo_keys.jsonand follow the syntax described inkeys/mongo_keys.json.sample. Write the collection names as the ones declared above.
- Create
keys/keys.jsonsimilar tokeys/keys.json.sampleand write yourapp_key,app_secret,oauth_token,oauth_token_secretin the same format. - You can add multiple keys in
keys.jsonby following array declaration rules in JSON.
- After installing dependencies, run the Flask server using the command:
python main.pyThe backend engine will be available at http://localhost:5000/ (5000 is the default port, might change according to the system.)