| import express from 'express'; | |
| import { fileURLToPath } from 'url'; | |
| import { dirname, join } from 'path'; | |
| const __dirname = dirname(fileURLToPath(import.meta.url)); | |
| const app = express(); | |
| app.use(express.static(join(__dirname, 'public'))); | |
| app.get('*', (req, res) => { | |
| res.sendFile(join(__dirname, 'public', 'index.html')); | |
| }); | |
| app.listen(7860, () => console.log('Running on port 7860')); | |