- From project dir:
docker build --tag keyvalue .
docker network create flask_network
docker run --network flask_network --name keyvalue -d -p 5000:5000 keyvalue
- The app should now be running on localhost:5000. If that doesn't open on your browser, you can check the running docker container for the right address.
- This simple app exposes 3 endpoints:
/store-value
, which takes either aPOST
orPATCH
request with payload in the format
and stores it in the database.{ "meta": { "key": "blah", "value": 4 } }
/get-value/<k>
, which takes aGET
request to get a key in the data store with keyk
/delete-key/<k>
, which takes aDELETE
request to delete a key in the data store with keyk