Use NanoBus and Dapr together to simplify cloud application development.
Before you begin, make sure you have the following installed:
-
Clone the nanobus/examples directory
git clone https://github.com/nanobus/examples.git cd examples/dapr
-
Run NanoBus and Dapr.
dapr run --app-id hello-world --app-port 19090 --app-protocol grpc -- nanobus run --debug --developer-mode bus.ts
The service stores people and publishes welcome events when they are created.
Data objects are stored using Dapr's State Store API and events are published via the PubSub API. This example is designed to use Redis image that is started in Docker via dapr init
.
curl -L -X POST 'http://localhost:8080/people' \
-H 'Content-Type: application/json' \
--data-raw '{
"id": "1234",
"firstName": "John",
"lastName": "Doe"
}'
curl -L -X GET 'http://localhost:8080/people/1234'
For more info, visit the NanoBus github repo.