Add /preview route serving the ghost preview page
This commit is contained in:
1 parent
e81f779ea5
commit
2d66d809d4
1 file changed
+5
@@ -35,6 +35,11 @@ app.get('/admin', (_req, res) => {
|
|||||||
res.sendFile(join(__dirname, 'public', 'admin.html'));
|
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).
|
// JSON error handler (multer + thrown errors).
|
||||||
app.use((err, _req, res, _next) => {
|
app.use((err, _req, res, _next) => {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
|
|||||||
Reference in new issue
Block a user