You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Program.cs 528B

12345678910111213141516171819202122
  1. using Diligent.WebAPI.Host.Hubs;
  2. using Serilog;
  3. using Serilog.Formatting.Json;
  4. var builder = WebApplication.CreateBuilder(args);
  5. builder.ConfigureData(builder.Configuration);
  6. var collection = builder.Services;
  7. Diligent.WebAPI.Host.Extensions.ApiConfiguration.ConfigureServices(collection);
  8. var app = builder.Build();
  9. app.UseCors("ClientPermission");
  10. app.MapControllers();
  11. app.UseAuthentication();
  12. app.UseAuthorization();
  13. app.SetupData();
  14. app.MapHub<ChatHub>("/chatHub");
  15. app.MapHub<ConnectionHub>("/statusHub");
  16. app.Run();