Add /preview route serving the ghost preview page

This commit is contained in:
2026-06-19 15:26:14 +10:00
parent e81f779ea5
commit 2d66d809d4
+5
View File
@@ -35,6 +35,11 @@ app.get('/admin', (_req, res) => {
res.sendFile(join(__dirname, 'public', 'admin.html'));
});
// Ghost preview page (admin-gated client-side; ghost list requires a JWT).
app.get('/preview', (_req, res) => {
res.sendFile(join(__dirname, 'public', 'preview.html'));
});
// JSON error handler (multer + thrown errors).
app.use((err, _req, res, _next) => {
console.error(err);