Prerequisites:
- Docker
- Swarm
To build all container images:
docker-compose buildDeploy the stack:
docker stack deploy -c docker-compose.yml tokenCall
POST http://localhost:5000/api/token
{
"username" : "mickey",
"password" : "mouse"
}
To get the token:
{
"token": "<JWT-TOKEN>"
}
Add the token as Bearer Authorization header
Authorization: Bearer <JWT-TOKEN>
To get:
GET http://localhost:5001/api/cars/
Play around