Add orchestration enrollment samples

This commit is contained in:
fiodarsazanavets
2026-02-07 12:16:49 +00:00
parent e8d6decd1a
commit 21f54adbcc
158 changed files with 121203 additions and 1 deletions
@@ -0,0 +1,35 @@
using OnlineShop.Web;
using OnlineShop.Web.Components;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddRazorComponents()
.AddInteractiveServerComponents();
builder.Services.AddOutputCache();
builder.Services.AddHttpClient<ProductsApiClient>(client =>
{
client.BaseAddress = new(builder.Configuration["ApiUrl"]!);
});
var app = builder.Build();
if (!app.Environment.IsDevelopment())
{
app.UseExceptionHandler("/Error", createScopeForErrors: true);
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseAntiforgery();
app.UseOutputCache();
app.MapStaticAssets();
app.MapRazorComponents<App>()
.AddInteractiveServerRenderMode();
app.Run();