python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
Make sure you have the following installed on your machine:
Follow these steps to Dockerize and run the Flask application.
Clone this repository to your local machine:
git clone https://github.com/kripashetty/flask-web-service-my-template.git
cd web-app
docker build -t my-flask-api .
docker run -d -p 5000:5000 my-flask-api
Create a item record :
curl --location 'http://127.0.0.1:5000/item/tea' \
--header 'Content-Type: application/json' \
--data '{
"price":100
}'
Get all items :
curl --location 'http://127.0.0.1:5000/items'
Get welcome message :
curl --location 'http://127.0.0.1:5000/'