Program.cs 549 B

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