using Serein.CloudWorkbench.Components; using Serein.CloudWorkbench.Services; namespace Serein.CloudWorkbench { public class Program { public static void Main(string[] args) { var builder = WebApplication.CreateBuilder(args); // Add services to the container. builder.Services.AddRazorComponents() .AddInteractiveServerComponents(); // ×¢²á CounterService ×÷Ϊµ¥Àý builder.Services.AddSingleton(); var app = builder.Build(); if (!app.Environment.IsDevelopment()) { app.UseExceptionHandler("/Error"); app.UseHsts(); } app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseAntiforgery(); app.MapRazorComponents() .AddInteractiveServerRenderMode(); app.Run(); } } }