From 30511cac81b17b17b0c5d75e8072f9d31851fc3a Mon Sep 17 00:00:00 2001 From: Andy Charlwood Date: Thu, 19 Feb 2026 14:14:08 +0000 Subject: [PATCH] Whoopsied the server --- server.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server.ts b/server.ts index 6248a9c..996a309 100644 --- a/server.ts +++ b/server.ts @@ -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