Fix: Always serve React build regardless of NODE_ENV

This commit is contained in:
nmemmert committed 2025-12-10 15:33:18 -05:00
1 parent 3c947ef6a3
commit 7214238f33
1 file changed
+4 -6
+4 -6
View File
@@ -364,13 +364,11 @@ app.post('/api/test-webhook', async (req, res) => {
} }
}); });
// Serve React app in production // Serve React app
if (process.env.NODE_ENV === 'production') { app.use(express.static(path.join(__dirname, '../client/build')));
app.use(express.static(path.join(__dirname, '../client/build'))); app.get('*', (req, res) => {
app.get('*', (req, res) => {
res.sendFile(path.join(__dirname, '../client/build/index.html')); res.sendFile(path.join(__dirname, '../client/build/index.html'));
}); });
}
// Start server // Start server
app.listen(PORT, () => { app.listen(PORT, () => {