Skip to content

Latest commit

 

History

History
38 lines (30 loc) · 717 Bytes

README.md

File metadata and controls

38 lines (30 loc) · 717 Bytes

Simple Rest API

Easy to understand Simple Flask App from flask-restful

Run

pip install -r requirements.txt
python api.py

Docker Build

docker build -t todoapp:latest .
docker run -d --name mytodoapp -p 8080:5000 todoapp:latest 

Routes

GET

curl http://localhost:5000/todos
curl http://localhost:5000/todos/todo1

CREATE

curl http://localhost:5000/todos -d "task=something new" -X POST -v

UPDATE

curl http://localhost:5000/todos/todo3 -d "task=something different" -X PUT -v

DELETE

curl http://localhost:5000/todos/todo2 -X DELETE -v