fix: correct static file serving MIME types and add error handling to standard save
This commit is contained in:
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user