Proof of concept for Choreography-based saga in NodeJS.
# Start docker containers
docker-compose up -d
# Start all
npm start
- Order Service - Mongo Express;
- Payment Service - Mongo Express;
- Shipment Service - Mongo Express;
- Stock Service - Mongo Express;
- Event Service - Mongo Express;
- POST http://localhost:3000/orders - Create pending order.
{
"items": [
{
"productId": "620953c6c4037f2c34607436",
"quantity": 4
}
]
}
- POST http://localhost:3001/payments - Make payment.
{
"orderId": "620953de53143ff095a8c09f",
"customerId": "620953c696a6bab50ef85f8b"
}