Files
serein-flow/Serein.CloudWorkbench/Program.cs

40 lines
964 B
C#
Raw Normal View History

2025-03-14 16:04:06 +08:00
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();
// ע<><D7A2> CounterService <20><>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>
builder.Services.AddSingleton<CounterService>();
var app = builder.Build();
if (!app.Environment.IsDevelopment())
{
app.UseExceptionHandler("/Error");
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseAntiforgery();
app.MapRazorComponents<App>()
.AddInteractiveServerRenderMode();
app.Run();
}
}
}