fix: correct static file serving MIME types and add error handling to standard save

This commit is contained in:
2026-06-23 19:08:08 +00:00
parent 3298cd8c5d
commit f1fc44c58b
2 changed files with 9 additions and 4 deletions
+1 -1
View File
@@ -219,7 +219,7 @@ const server = http.createServer((req, res) => {
// --- END STANDARDS CRUD ---
// Serve static files
let filePath = path.join(DIST_DIR, req.url === '/' ? 'index.html' : req.url);
let filePath = path.join(DIST_DIR, pathname === '/' ? 'index.html' : pathname);
// If path doesn't exist, fallback to index.html (SPA routing)
if (!fs.existsSync(filePath) || fs.statSync(filePath).isDirectory()) {