Whoopsied the server

This commit is contained in:
2026-02-19 14:14:08 +00:00
parent 95ea088a00
commit 30511cac81
+3 -3
View File
@@ -9,8 +9,8 @@ const __dirname = path.dirname(__filename)
const app = express()
app.use(express.json())
// Serve static files from Vite build
app.use(express.static(path.join(__dirname, 'dist')))
// Serve static files from Vite build (dist/ is at project root, one level up from dist-server/)
app.use(express.static(path.join(__dirname, '..', 'dist')))
// Contact API endpoint
app.post('/api/contact', async (req, res) => {
@@ -156,7 +156,7 @@ app.post('/api/chat', async (req, res) => {
// SPA fallback
app.get('*', (_req, res) => {
res.sendFile(path.join(__dirname, 'dist', 'index.html'))
res.sendFile(path.join(__dirname, '..', 'dist', 'index.html'))
})
const PORT = process.env.PORT || 3000