Added healthchecks endpoint to app

This commit is contained in:
2026-03-08 13:40:25 +02:00
parent d57b924425
commit 4b8bf81c05

View File

@@ -3,6 +3,7 @@ var builder = WebApplication.CreateBuilder(args);
builder.Services.AddControllers();
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
builder.Services.AddHealthChecks();
var app = builder.Build();
@@ -12,6 +13,7 @@ if (app.Environment.IsDevelopment())
app.UseSwaggerUI();
}
app.MapHealthChecks("/health");
app.UseRouting();
app.UseHttpsRedirection();
app.UseAuthorization();