<?php
require __DIR__ . '/api/bootstrap.php';
try {
  $p = pdo();
  $row = $p->query("SELECT NOW() as now")->fetch();
  json_ok(['php'=>PHP_VERSION,'db_time'=>$row['now'],'base'=>base_url()]);
} catch (Throwable $e) {
  json_fail('HEALTH_FAIL',$e->getMessage(),500);
}
