- https://github.com/casey/just
- https://pnpm.io/
- https://formulae.brew.sh/formula/docker
- https://formulae.brew.sh/formula/docker-compose
- if required https://github.com/abiosoft/colima
Consumer: Person Provider: Food
(cd broker && just restart)
(cd broker && just browser)
provider/provider/person.test.js
(cd provider && just verify)
consumer/contracts/food.test.js
(cd consumer && just test)
(cd consumer && just publish-contracts)
(cd broker && just browser)
(cd provider && just verify)
consumer/contracts/food.test.js
results: [{ name: "Chicken" }]
[{ name: "Chicken" }]
(cd consumer && just test)
consumer/contracts/food.test.js
const originalBody = await (await fetch(`${this.baseUrl}/food`)).json()
return originalBody.results
(cd consumer && just test)
git add . && git commit
parse response from Food GET /food
(cd consumer && just publish-contracts)
(cd provider && just verify)
res.end(
JSON.stringify({
results: [{ name: "Chicken" }],
})
);