Skip to content
Service to Service communication with Hemera and NATS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
api
cart-service
products-service
.editorconfig
.gitignore
LICENSE
README.md
demo.png
docker-compose.yml
example.mmd
example.png

README.md

Hemera NATS Demo

example sequence

This is an example accompanying an article published here:

https://medium.com/heneise/service-to-service-communication-with-hemera-and-nats-d3cbf0727ef8

Requirements

  • Docker Compose

Setup & Startup

git clone https://github.com/heneise/hemera-nats-demo.git
cd hemera-nats-demo
docker-compose up

Querying the API

# Put products into the cart
curl \
  -XPOST localhost:3000/cart \
  -H "Content-Type: application/json" \
  -d '{"productId":0, "quantity":1}'
curl \
  -XPOST localhost:3000/cart \
  -H "Content-Type: application/json" \
  -d '{"productId":2, "quantity":5}'
# Retrieve the cart
curl localhost:3000

Thanks

Special thanks to the team behind NATS and Dustin Deus, the author of hemera.

License

This project is licensed under the MIT License - see the LICENSE file for details

You can’t perform that action at this time.