PIbd-22_Chernyshev_Shabunov.../ComputerShopRestApi/Program.cs

20 lines
366 B
C#

var Builder = WebApplication.CreateBuilder(args);
Builder.Services.AddControllers();
Builder.Services.AddEndpointsApiExplorer();
Builder.Services.AddSwaggerGen();
var App = Builder.Build();
if (App.Environment.IsDevelopment())
{
App.UseSwagger();
App.UseSwaggerUI();
}
App.UseHttpsRedirection();
App.UseAuthorization();
App.MapControllers();
App.Run();