Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/Content/NetCoreTool.Template.WebApi/CSharp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@
builder.Configuration.AddPlaceholderResolver();
#endif
#if (HasAnyNonAzureHostingInSteeltoeV3)
// Configures the application to listen on the port(s) provided by the cloud platform.
builder.UseCloudHosting();
#endif
#if (HostingCloudFoundryOption)
Expand Down Expand Up @@ -221,12 +222,17 @@
builder.Services.ConfigureCloudFoundryOptions(builder.Configuration);
#endif
#if (HasAnyDiscoveryInSteeltoeV3)
// Registers this application with a service discovery provider (e.g., Eureka, Consul).
builder.Services.AddDiscoveryClient(builder.Configuration);
#else
#if (HasDiscoveryConsulInSteeltoeV44)
// Registers this application with Consul for service discovery.
// Port registration is automatically detected from the server's listening addresses.
builder.Services.AddConsulDiscoveryClient();
#endif
#if (HasDiscoveryEurekaInSteeltoeV4)
// Registers this application with Eureka for service discovery.
// Port registration is automatically detected from the server's listening addresses.
builder.Services.AddEurekaDiscoveryClient();
#endif
#endif
Expand Down