diff --git a/src/BlazorApp/Program.cs b/src/BlazorApp/Program.cs index 162930b..45d3f56 100644 --- a/src/BlazorApp/Program.cs +++ b/src/BlazorApp/Program.cs @@ -2,16 +2,19 @@ using BlazorApp.Components; var builder = WebApplication.CreateBuilder(args); -// Add services to the container. builder.Services.AddRazorComponents(); var app = builder.Build(); -// Configure the HTTP request pipeline. +app.MapGet("/health", () => Results.Ok(new +{ + status = "healthy", + timestamp = DateTime.UtcNow +})); + if (!app.Environment.IsDevelopment()) { app.UseExceptionHandler("/Error", true); - // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. app.UseHsts(); }