39498-vm/healthz.php
2026-04-06 05:35:15 +00:00

18 lines
365 B
PHP

<?php
declare(strict_types=1);
require_once __DIR__ . '/app.php';
try {
ensure_schema();
db()->query('SELECT 1');
http_response_code(200);
header('Content-Type: text/plain; charset=utf-8');
echo "ok\n";
} catch (Throwable $exception) {
http_response_code(500);
header('Content-Type: text/plain; charset=utf-8');
echo "error\n";
}