cs-codex-dist-tests/AutoClientCenter/Program.cs

34 lines
749 B
C#
Raw Normal View History

2024-09-11 10:08:06 +00:00
namespace AutoClientCenter
{
public class Program
{
public static void Main(string[] args)
{
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddSingleton<ITaskService>(new TaskService());
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();
}
}
}