Skip to content

Commit c0dbcfe

Browse files
committed
added custom urls
1 parent 6f7bb37 commit c0dbcfe

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

byoss/AspireApp1.AppHost/AspireApp1.AppHost.csproj

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
<TargetFramework>net9.0</TargetFramework>
88
<ImplicitUsings>enable</ImplicitUsings>
99
<Nullable>enable</Nullable>
10-
<IsAspireHost>true</IsAspireHost>
1110
<UserSecretsId>2c343a00-3aab-423f-b3a2-2feabf216baa</UserSecretsId>
1211
</PropertyGroup>
1312

byoss/AspireApp1.AppHost/Program.cs

+11-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,17 @@
33
var db = builder.AddConnectionString("db");
44

55
builder.AddProject<Projects.WebApplication1>("webapi")
6+
.WithUrlForEndpoint("http", url =>
7+
{
8+
url.DisplayText = "Forecast API (HTTP)";
9+
url.Url += "/weatherforecast";
10+
})
11+
.WithUrlForEndpoint("https", url =>
12+
{
13+
url.DisplayText = "Forecast API (HTTPS)";
14+
url.Url += "/weatherforecast";
15+
})
616
.WithReference(db);
7-
17+
;
818

919
builder.Build().Run();

0 commit comments

Comments
 (0)