This project is a demo for Aspire, showcasing how to publish an api and wasm app. Since you can't host wasm without may be IIS I chose to use .Net web app to use kastrel to host instead. I don't know why I just thought it would be nice that way.
It's a pretty simple barebones project. You may want to find out more about Aspire and how you can use service discovery and health checks from somewhere else. I'm pretty impressed so far.
To publish to docker at solution directory run:
aspire publish -o infra
cd infra
docker compose up -dUsing Resource.WithHttpEndpoint() will throw an exception if there
is already a registered http endpoint however if I use Resource.WithEndpoint
with ep => ep.Transport = "http"; then this endpoint will override the
original endpoint. I would expect this same behaviour from
Resource.WithHttpEndpoint(). Not because they should be the same but
because there's no clear way to override an http endpoint just by looking
at the available methods. Having one of them throw and exception made me
think that the expected behaviour for the other one is same. This made me
waste a lot of time trying to figure out the correct way to override
an already configured endpoint.
There may be a good reason it's like that. All I know is that was a painful experience.