namespace Anubis.Server;
/// Builds the web application. Kept apart from Program so tests can host it.
internal static class ServerApp
{
public static WebApplication Build(string[] args)
{
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();
app.MapGet("/health", () => Results.Ok(new HealthResponse("ok", AnubisInfo.Name, AnubisInfo.Version)));
return app;
}
}
/// Answer of GET /health.
internal sealed record HealthResponse(string Status, string Name, string Version);