Skip to content

Simple DjangoRestFramework project used for some personal examples.

Notifications You must be signed in to change notification settings

vamonte/toDoExample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

toDoExample

toDoExample is a DjangoRestFramework project used for some personal examples. For example this project is used to demonstrate how to deploy a swarm stack behind a traefik proxy. (https://github.com/vamonte/TraefikExample)

How to

To run the stack you just have to use the docker-compose file.

docker-compose up 

The project provides one HTTP resource named 'todos'. You may request it as bellow.

#List all the todos
curl http://localhost:8000/todos/

#Add one todo
curl -X POST -H "content-type: application/json" -d '{"title": "test"}' http://localhost:8000/todos/

#Retrieve one todo
curl http://localhost:8000/todos/<id>/

#Update one todo
curl -X PUT -H "content-type: application/json" -d '{"title": "new title"}' http://localhost:8000/todos/1/
 
#Delete one todo
curl -X DELETE http://localhost:8000/todos/1/

You may download the container image to reuse the app for your own examples.

docker pull vmonte/todoexample:latest

About

Simple DjangoRestFramework project used for some personal examples.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published