load(); if (php_sapi_name() != 'cli') { session_start(); $auth0_user = Auth::user(); if (!is_null($auth0_user)) { $_SESSION['user_id'] = $auth0_user['sub']; } } Configuration::$pdoDSN = 'sqlite:' . implode(DIRECTORY_SEPARATOR, [__DIR__, 'data', 'mpj.db']); Configuration::$mode = Mode::SQLite; Definition::ensureTable(Table::REQUEST); $_PATCH = []; if ($_SERVER['REQUEST_METHOD'] ?? '' == 'PATCH') parse_str(file_get_contents('php://input'), $_PATCH); /** * Return a 404 and exit */ function not_found(): never { http_response_code(404); die('Not found'); }