This is my personal playground for experimenting with Dapr and the .NET 6.0 Minimal APIs.
I'm personally enamoured with the idea of what Dapr is bringing to the table, and I like the simplicity of using C# 9's Top-level statements to create applications and micro-services. These two combined create a wonderfully small application which could offer a very compelling platform for work.
This repo contains two .NET applications:
publisher
- A console application for publishing a counter.subscriber
- A Minimal API app using Dapr to store its state, and receive updates from thepublisher
.
Skip steps if you know what you're doing. ๐
- Install Dapr.
- Install Dotnet - .NET 6.0 Preview 7 or later.
- Initialize Dapr -
dapr init
. - Run the subscriber - From the
subscriber
directory, run the app in dapr:dapr run -a dapr-mini-api-sub --app-port 5000 dotnet watch run
- Run the publisher - From the
publisher
directory, run the app in dapr:dapr run -a dapr-mini-api-pub dotnet watch run
- Profit? ๐ธ