20 lines
366 B
C#
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();
|