mirror of
https://github.com/Stone-Red-Code/RemoteExec.git
synced 2026-09-04 23:42:03 +02:00
28 lines
522 B
C#
28 lines
522 B
C#
using RemoteExec.Server.Hubs;
|
|
|
|
WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
|
|
|
|
// Add services to the container.
|
|
|
|
builder.Services.AddControllers();
|
|
builder.Services.AddSignalR();
|
|
builder.Services.AddOpenApi();
|
|
|
|
WebApplication app = builder.Build();
|
|
|
|
app.MapHub<RemoteExecutionHub>("/remote");
|
|
|
|
// Configure the HTTP request pipeline.
|
|
if (app.Environment.IsDevelopment())
|
|
{
|
|
_ = app.MapOpenApi();
|
|
}
|
|
|
|
app.UseHttpsRedirection();
|
|
|
|
app.UseAuthorization();
|
|
|
|
app.MapControllers();
|
|
|
|
await app.RunAsync();
|