Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

AspireDemo

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.

Publishing to docker

To publish to docker at solution directory run:

aspire publish -o infra
cd infra
docker compose up -d

One Major Complaint

Using 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.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages