<?php
/**
 * Health Check API Endpoint
 */

$config = require __DIR__ . '/../config/config.php';
require_once __DIR__ . '/../src/Core/Database.php';
require_once __DIR__ . '/../src/Core/Logger.php';
require_once __DIR__ . '/../src/Core/HealthCheck.php';
require_once __DIR__ . '/../src/Core/SecurityHeaders.php';

\App\Core\SecurityHeaders::setForApi();

$logger = new \App\Core\Logger(__DIR__ . '/../logs/app.log');
$db = \App\Core\Database::getInstance($config['db'])->connection();
$healthCheck = new \App\Core\HealthCheck($db, $config, $logger);

$healthCheck->apiResponse();
