Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/backend/Program.cs
blob: d3dd143b19f7fd93c6b2a5d4a383062cfb8ecd0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com>
// SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1

WebApplicationBuilder builder = WebApplication.CreateBuilder(args);

builder.Services.AddProblemDetails();
builder.Services.AddHealthChecks();

WebApplication app = builder.Build();

app.UseExceptionHandler();
app.MapHealthChecks("/health");
app.MapGet("/api/v1/status", () => Results.Ok(new ServiceStatus("viget", "online", true)));

app.Run();

internal sealed record ServiceStatus(string Service, string Status, bool RegistryAvailable);

// WebApplicationFactory uses this partial type to host the same production
// entry point in the ViGet boundary test. Account endpoints intentionally live
// in Progmaweb and must not be reintroduced here.
public partial class Program;