Files
Control-Center/backend/Program.cs

24 lines
470 B
C#
Raw Permalink Normal View History

using ControlCenter.Api.Hubs;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddOpenApi();
// Register SignalR for real-time agent status updates
builder.Services.AddSignalR();
var app = builder.Build();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.MapOpenApi();
}
app.UseHttpsRedirection();
// Map SignalR hub endpoint
app.MapHub<AgentStatusHub>("/hub");
app.Run();