require_once "vendor/autoload.php"; use \Prospera\Http\{Router, Http, StatusCode}; use \App\Models\Usuario; use \App\Controllers\WebsiteController; try { PSF::init(['config' => 'config.php']); if(isset($_GET['_url']) && !empty($_GET['_url'])){ $handle = (new Router)->handle(); }else{ (new WebsiteController)->index(); } } catch (\Exception $e) { Http::response("Erro ao processar a requisição", [ "info" => $e->getMessage() == StatusCode::NOT_FOUND ? "Rota não localizada" : ($e->getMessage() == StatusCode::UNAUTHORIZED ? "Este endpoint requer autenticação" : $e->getMessage()), "route" => $_GET['_url'] ], $e->getMessage()); }