Add /preview route serving the ghost preview page
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user