13 lines
526 B
PHP
13 lines
526 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
require_once __DIR__ . '/includes/app.php';
|
|
header('Content-Type: application/json; charset=utf-8');
|
|
try {
|
|
ensure_applications_table();
|
|
db()->query('SELECT 1');
|
|
echo json_encode(['status' => 'ok', 'time' => gmdate('c'), 'db' => 'ok'], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
|
|
} catch (Throwable $exception) {
|
|
http_response_code(500);
|
|
echo json_encode(['status' => 'error', 'time' => gmdate('c'), 'db' => 'error'], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
|
|
}
|