Redirect / to /dashboard.html

Visiting the bare root path returned Express's default "Cannot GET /"
since there was no route or index.html for it. dashboard.js already
bounces to /login.html when the session check fails, so this one
redirect covers both logged-in and logged-out visitors.
This commit is contained in:
ort
2026-08-15 14:55:06 -04:00
parent 9021a7839d
commit 56d8c4616c
+6
View File
@@ -53,6 +53,12 @@ app.get('/k/:token', (req, res) => {
res.sendFile(path.join(__dirname, '..', 'public', 'kiosk.html'));
});
// dashboard.js itself bounces to /login.html if the session check fails,
// so this one redirect covers both logged-in and logged-out visitors.
app.get('/', (req, res) => {
res.redirect('/dashboard.html');
});
app.use(express.static(path.join(__dirname, '..', 'public')));
app.use('/api', (req, res) => {