Add Alpine.js premium frontend dashboard and root routing
This commit is contained in:
@@ -20,6 +20,13 @@ $router = new Router();
|
||||
$router->use(\App\Middlewares\SecurityMiddleware::class);
|
||||
|
||||
// 4. Define API Routes
|
||||
// Serve index.html dashboard on root path
|
||||
$router->get('/', function ($request, $response) {
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
readfile(__DIR__ . '/index.html');
|
||||
exit;
|
||||
});
|
||||
|
||||
// Health Check — no php_version or environment in production to avoid info disclosure
|
||||
$router->get('/api/health', function ($request, $response) {
|
||||
$response->json([
|
||||
|
||||
Reference in New Issue
Block a user