What have you learned, Dorothy?
As you can see, the sample application consists of a number of projects. The first, perhaps most essential is the app host, which acts as the orchestrator. It will automatically set IsAspireHost
in the project file to true.
Pour through the Program.cs
file and you’ll see what you’d expect as an API developer, along with Aspire in APIService
(and a couple of things added for Blazor).
Note that the first line creates DistributedApplication
using Docker.
A critical line in this file is AspirePackt.ApiService
, which configures the service discovery and communication among the projects in your solution. The name (apiservice
) identifies the project and is used by projects that want to communicate with it.
Another important and universal project is ServiceDefaults
, which is a shared project that manages configurations so that they can be used across projects. This allows the application to have all the services share service discovery...