fix: Lösung in den Stammordner verschoben

This commit is contained in:
Developer 02
2025-01-29 18:12:37 +01:00
parent 27fb2af845
commit 836b19df9e
8 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
using DigitalData.Swagger.Proxy.Configs;
var builder = WebApplication.CreateBuilder(args);
var config = builder.Configuration;
// Add services to the container.
builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
var originServerSection = config.GetRequiredSection("OriginServer")
?? throw new InvalidOperationException("The 'OriginServer' section is missing or incorrectly configured in the application configuration.");
builder.Services.Configure<OriginServerParams>(originServerSection);
var app = builder.Build();
// use swagger in production
app.UseSwagger();
app.UseSwaggerUI();
app.UseHttpsRedirection();
app.UseAuthorization();
app.MapControllers();
app.Run();