feat: unify kernel entry
All checks were successful
JS Unit Tests / test (pull_request) Successful in 38s
Build Test / build (pull_request) Successful in 41s
PHP Unit Tests / test (pull_request) Successful in 50s

Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
2026-02-20 17:48:31 -05:00
parent c310b96a26
commit d81e894c81
4 changed files with 308 additions and 415 deletions

View File

@@ -1,22 +1,11 @@
<?php
use KTXC\Application;
use KTXC\Module\ModuleAutoloader;
use KTXC\Server;
// Capture Composer ClassLoader instance
// Capture Composer ClassLoader instance for compatibility
$composerLoader = require_once __DIR__ . '/../vendor/autoload.php';
// Determine project root (one level up from this file)
$projectRoot = dirname(__DIR__);
$server = new Server(dirname(__DIR__));
Server::setComposerLoader($composerLoader);
// Create and run application
$app = new Application($projectRoot);
// Store composer loader for compatibility
Application::setComposerLoader($composerLoader);
// Register custom module autoloader for lazy loading
$moduleAutoloader = new ModuleAutoloader($app->moduleDir());
$moduleAutoloader->register();
$app->run();
$server->runHttp();