Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Claudio Schaad <c.schaad@pog.ch> Co-committed-by: Claudio Schaad <c.schaad@pog.ch>
21 lines
596 B
C#
21 lines
596 B
C#
using Schaad.OpenData.Server.Traffic;
|
|
using Schaad.OpenData.Server.Watercraft;
|
|
using Schaad.OpenData.Traffic;
|
|
using Schaad.OpenData.Watercraft;
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
builder.Services.AddTraffic(builder.Configuration);
|
|
builder.Services.AddWatercraft(builder.Configuration);
|
|
builder.Services.AddResponseCompression(options => options.EnableForHttps = true);
|
|
|
|
var app = builder.Build();
|
|
|
|
app.UseResponseCompression();
|
|
app.UseDefaultFiles();
|
|
app.UseStaticFiles();
|
|
app.MapTrafficEndpoints();
|
|
app.MapWatercraftEndpoints();
|
|
app.MapFallbackToFile("index.html");
|
|
|
|
app.Run();
|