A RESTful API for managing a todo list. Written in Flask and Python
python app.py./run.shYou'll need the following environment variables to be defined
- MONGODB_HOST (MongoDB host)
- MONGODB_PORT (MongoDB port)
Checks to see if the API is alive and can connect to mongo
curl --request GET \
--url http://localhost:5000/healthGets all the tasks
curl --request GET \
--url http://localhost:5000/todo/api/tasksLists a task with given task ID
curl --request GET \
--url http://localhost:5000/todo/api/tasks/1Create a task
curl --request POST \
--url http://localhost:5000/todo/api/tasks \
--header 'content-type: application/json' \
--data '{ \
"title": "Buy Milk", \
"description": "Buy some milk" \
}'Update a task with given task ID
curl --request PUT \
--url http://localhost:5000/todo/api/tasks/1 \
--header 'content-type: application/json' \
--data '{ \
"title": "Bleh", \
"description": "Bleh bleh bleh", \
"done": true \
}'Delete a task with a given ID
curl --request DELETE \
--url http://localhost:5000/todo/api/tasks/1