Forum Discussion
How to get a routable address to an API when building an Aspire AppHost with Aspirate tools?
Hellow all,
I have an Aspire AppHost application with a couple of API's. I need a client (javascript) to be able to reach one of those API's. To do this, I ask api.GetEndpoint("https") in the AppHost and set the Environment.
When I build from Visual Studio and test (Kestrel) I can query the http endpoint and get hte routable localhost:[port] address. Perfect!
Now I want to deploy this to Azure, so....
I build from poweshell using aspirate to simulate the environment that Azure would have. Docker containers built, Kubernetes in place build is good, I get a localhost:[port] for my services and the Aspire dashboard.
However, in my AppHost code, there is no routable address given from Service Discovery to hand to javascript. It is [::]:8080.
I looked over some Container 'DnsResolver' packages, but none of them worked.
What magic is needed to get a routable address returned from api.GetEndpoint("https") when building a containerized application with aspirate?
Thansk much in advance!
-Timoth