feat(backend): scaffold ASP.NET Core Web API with health endpoint

This commit is contained in:
Rafał Tyński
2026-10-03 18:30:43 +02:00
parent 74f14e93ea
commit f26ad1744e
7 changed files with 169 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
var builder = WebApplication.CreateBuilder(args);
// Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi
builder.Services.AddOpenApi();
builder.Services.AddControllers();
var app = builder.Build();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.MapOpenApi();
}
else
{
app.UseHttpsRedirection();
}
app.UseDefaultFiles();
app.UseStaticFiles();
app.MapControllers();
app.MapFallbackToFile("index.html");
app.Run();