addBootstrapper(new ConfigInitializer()); $app->addBootstrapper(new DatabaseInitializer()); $app->addBootstrapper(new SessionInitializer()); $app->addBootstrapper(new SlimAppRegistrar()); $app->addBootstrapper(new ModuleLoader()); $app->run(); } catch (\Throwable $e) { http_response_code(500); echo json_encode([ 'error' => 'Application failed to start', 'message' => $e->getMessage(), 'file' => $e->getFile(), 'line' => $e->getLine(), ], JSON_PRETTY_PRINT); }