39499-vm/healthz/index.php
2026-04-06 06:47:41 +00:00

25 lines
633 B
PHP

<?php
declare(strict_types=1);
require_once __DIR__ . '/../includes/taxilanz.php';
header('Content-Type: application/json; charset=utf-8');
try {
app_boot();
db()->query('SELECT 1');
http_response_code(200);
echo json_encode([
'status' => 'ok',
'app' => 'TaxiLanz MVP',
'time' => gmdate('c'),
], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
} catch (Throwable $e) {
http_response_code(500);
echo json_encode([
'status' => 'error',
'message' => 'Health check failed',
'time' => gmdate('c'),
], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
}