Update dash-server.js

Damian Freeman 2024-10-14 16:39:04 -04:00
parent b60bde9088
commit fcf3324fa8
1 changed files with 4 additions and 0 deletions

View File

@ -5,6 +5,10 @@ const port = 6574;
// Serve static files from your directory // Serve static files from your directory
app.use(express.static('/home/harry/Documents/staff-dash')); app.use(express.static('/home/harry/Documents/staff-dash'));
app.use("*", (req, res) => {
res.status(404).redirect('/');
})
app.listen(port, () => { app.listen(port, () => {
console.log(`Server running at http://staff.libraryofcode.org:${port}`); console.log(`Server running at http://staff.libraryofcode.org:${port}`);
}); });