- Apply migrations:
sudo docker-compose run workout-project migrate
- Run server:
sudo docker-compose up workout-project
- Open API: 127.0.0.1:1337/api/v1/
sudo docker-compose run --entrypoint tox workout-project
- Add user:
sudo docker-compose run workout-project createsuperuser
- Get token:
curl -X POST -d "username=USER&password=PASSWORD" http://127.0.0.1:1337/api/v1/token/obtain/
- Get endpoints:
curl -H "Authorization: JWT <your_token>" http://127.0.0.1:1337/api/v1/ | json_pp
Response:
{
"exercises" : "http://127.0.0.1:1337/api/v1/exercises/?format=json",
"users" : "http://127.0.0.1:1337/api/v1/users/?format=json",
"plans" : "http://127.0.0.1:1337/api/v1/plans/?format=json",
"days" : "http://127.0.0.1:1337/api/v1/days/?format=json"
}