mirror of
https://github.com/DeNNiiInc/Advanced-Raid-Calculator.git
synced 2026-04-17 12:45:59 +00:00
17 lines
480 B
JavaScript
17 lines
480 B
JavaScript
const express = require('express');
|
|
const path = require('path');
|
|
const app = express();
|
|
const PORT = process.env.PORT || 3000;
|
|
|
|
// Serve static files from the current directory
|
|
app.use(express.static(__dirname));
|
|
|
|
// Fallback to index.html for any other requests (SPA behavior, though this is a simple page)
|
|
app.get('*', (req, res) => {
|
|
res.sendFile(path.join(__dirname, 'index.html'));
|
|
});
|
|
|
|
app.listen(PORT, () => {
|
|
console.log(`Server is running on port ${PORT}`);
|
|
});
|