25973cabbc
- Replace emoji icons with Lucide SVG icons (moon, sun, settings, x, upload, rotate-ccw, trash-2, save) - Add Node.js dev server on port 3010 (server.js + npm run serve) - Redesign settings modal: tabbed layout, styled form fields, Save/Cancel footer - Fix dark mode: btn-danger hover now uses rgba instead of hardcoded light pink - Fix stale pendingBranding: history item click now calls revertAndClose() - Collapse branding header when no name/logo is set - Move density row inline style to .density-info CSS class - Normalise all innerText to textContent Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
35 lines
958 B
JavaScript
35 lines
958 B
JavaScript
const http = require('http');
|
|
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
const PORT = 3010;
|
|
|
|
const mimeTypes = {
|
|
'.html': 'text/html',
|
|
'.js': 'application/javascript',
|
|
'.css': 'text/css',
|
|
'.png': 'image/png',
|
|
'.ico': 'image/x-icon',
|
|
'.json': 'application/json',
|
|
};
|
|
|
|
const server = http.createServer((req, res) => {
|
|
const filePath = path.join(__dirname, req.url === '/' ? 'index.html' : req.url);
|
|
const ext = path.extname(filePath);
|
|
const contentType = mimeTypes[ext] || 'application/octet-stream';
|
|
|
|
fs.readFile(filePath, (err, data) => {
|
|
if (err) {
|
|
res.writeHead(404, { 'Content-Type': 'text/plain' });
|
|
res.end('404 Not Found');
|
|
return;
|
|
}
|
|
res.writeHead(200, { 'Content-Type': contentType });
|
|
res.end(data);
|
|
});
|
|
});
|
|
|
|
server.listen(PORT, () => {
|
|
console.log(`Freight Calculator Pro running at http://localhost:${PORT}`);
|
|
});
|