Flask application to save, update, delete and find data stored in mongodb using api.
You can also use postman to verify ur requests.
Using Robo-3T to check my data stored in Mongo.
Commands to install python --version 3+
sudo apt-get update
sudo apt-get -y install python3.x
Use the package manager pip to install Flask and Pymongo
pip install flask
pip install pymongo
You can create a virtual environment and install the required packages with the following commands:
$ virtualenv venv
$ . venv/bin/activate
(venv) $ pip install -r requirements.txt
(venv) $ python3 app.py
To run the main program using Dockerfile pull the code to local system and run the DockerFile using command,
docker run -d -p 5000:5000 keshav/ubuntu:flask
docker pull mongodb
The uri used in mongo connection in database.py is for the mongo image.
For local setup use uri="mongodb://127.0.0.1:27017"