Spin up the development environment through:
docker-compose up -d
Start the project through starting all the defined microservices (starting with config-server)
- Add product
POST http://localhost:8080/command/create
Request Body:
{
"ref": "string",
"name": "string",
"description": "string",
"price": "number",
"quantity": "integer"
}
- Buy Product
POST http://localhost:8080/command/buy/<product-ref>
- Refill Product
POST http://localhost:8080/query/
- Get All Products
GET http://localhost:8080/command/refill/<product-ref>?quantity=<quantity>
- Get Product by reference
GET http://localhost:8080/query/<product-ref>
- Clear query database
DELETE localhost:8080/query/purge
- Clear command database
DELETE localhost:8080/command/purge
Github repository containing the microservices configuration.