tzjppp / server.js
txtorg's picture
Update server.js
9da3fad verified
Raw
History Blame Contribute Delete
519 Bytes
const express = require('express');
const path = require('path');
const app = express();
app.use(express.static('public')); // Serve static files
// Serve manifest.json
app.get('/manifest.json', (req, res) => {
res.sendFile(path.join(__dirname, 'public', 'manifest.json'));
});
// Default route to index.html
app.get('/', (req, res) => {
res.sendFile(path.join(__dirname, 'public', 'index.html'));
});
const PORT = process.env.PORT || 7860;
app.listen(PORT, () => console.log(`Server running on port ${PORT}`));