Program.cs 609 B

1234567891011121314151617181920212223242526
  1. using Hotline.Api.Sdk;
  2. var builder = WebApplication.CreateBuilder(args);
  3. builder.Services.AddHotlineSdk("http://localhost:50100", "sharing", "Fwkj@789");
  4. // Add services to the container.
  5. builder.Services.AddControllers();
  6. // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
  7. builder.Services.AddEndpointsApiExplorer();
  8. builder.Services.AddSwaggerGen();
  9. var app = builder.Build();
  10. // Configure the HTTP request pipeline.
  11. if (app.Environment.IsDevelopment())
  12. {
  13. app.UseSwagger();
  14. app.UseSwaggerUI();
  15. }
  16. app.UseAuthorization();
  17. app.MapControllers();
  18. app.Run();