Staff-Dashboard/dash-server.js

15 lines
353 B
JavaScript
Raw Normal View History

2024-10-13 15:17:45 -04:00
const express = require('express');
const app = express();
const port = 6574;
// Serve static files from your directory
app.use(express.static('/home/harry/Documents/staff-dash'));
2024-10-14 16:39:04 -04:00
app.use("*", (req, res) => {
res.status(404).redirect('/');
})
2024-10-13 15:17:45 -04:00
app.listen(port, () => {
console.log(`Server running at http://staff.libraryofcode.org:${port}`);
});