unbound-video-forge / server.js
Spyda573's picture
Run the website for me
c1cc03a verified
Raw
History Blame Contribute Delete
401 Bytes
const express = require('express');
const path = require('path');
const app = express();
const port = 3000;
// Serve static files
app.use(express.static(path.join(__dirname)));
// Handle all routes by sending the index.html
app.get('*', (req, res) => {
res.sendFile(path.join(__dirname, 'index.html'));
});
app.listen(port, () => {
console.log(`Server running at http://localhost:${port}`);
});