From fcf3324fa8ee732eee94bcec078ccf5c0d3c63a6 Mon Sep 17 00:00:00 2001 From: Damian Freeman Date: Mon, 14 Oct 2024 16:39:04 -0400 Subject: [PATCH] Update dash-server.js --- dash-server.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dash-server.js b/dash-server.js index 0706c16..41610ba 100644 --- a/dash-server.js +++ b/dash-server.js @@ -5,6 +5,10 @@ const port = 6574; // Serve static files from your directory app.use(express.static('/home/harry/Documents/staff-dash')); +app.use("*", (req, res) => { + res.status(404).redirect('/'); +}) + app.listen(port, () => { console.log(`Server running at http://staff.libraryofcode.org:${port}`); });