Newer
Older
smart-home-server / webclient / index.php
<?php
/**
 * SPA entry point — serves the built Vue application from dist/index.html.
 * Keeps the same root-level entry structure as the legacy client.
 */
$indexPath = __DIR__ . '/dist/index.html';
if (file_exists($indexPath)) {
	header('Content-Type: text/html; charset=utf-8');
	readfile($indexPath);
} else {
	http_response_code(503);
	echo '<!doctype html><html><head><title>Not built</title></head><body>';
	echo '<h1>Client not built</h1><p>Run <code>npm run build</code> in the webclient directory.</p>';
	echo '</body></html>';
}