<?php
require __DIR__ . '/vendor/autoload.php';

$dotenv = Dotenv\Dotenv::createImmutable(__DIR__);
$dotenv->safeLoad();

use App\Database;

try {
    $pdo = Database::getConnection();
    $stmt = $pdo->query('SELECT 1');
    echo "OK: Database connection successful.\n";
} catch (Exception $e) {
    echo "ERROR: " . $e->getMessage() . "\n";
}
