Program.cs 504 B

1234567891011121314151617181920212223
  1. var builder = WebApplication.CreateBuilder(args);
  2. // Add services to the container.
  3. builder.Services.AddControllers();
  4. // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
  5. builder.Services.AddEndpointsApiExplorer();
  6. builder.Services.AddSwaggerGen();
  7. var app = builder.Build();
  8. // Configure the HTTP request pipeline.
  9. if (app.Environment.IsDevelopment())
  10. {
  11. app.UseSwagger();
  12. app.UseSwaggerUI();
  13. }
  14. app.UseAuthorization();
  15. app.MapControllers();
  16. app.Run();