CUB-53: add SignalR hub registration and configuration
This commit is contained in:
24
backend/Program.cs
Normal file
24
backend/Program.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
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();
|
||||
Reference in New Issue
Block a user