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
+5 -7
+5 -7
View File
@@ -364,13 +364,11 @@ app.post('/api/test-webhook', async (req, res) => {
}
});
// Serve React app in production
if (process.env.NODE_ENV === 'production') {
app.use(express.static(path.join(__dirname, '../client/build')));
app.get('*', (req, res) => {
res.sendFile(path.join(__dirname, '../client/build/index.html'));
});
}
// Serve React app
app.use(express.static(path.join(__dirname, '../client/build')));
app.get('*', (req, res) => {
res.sendFile(path.join(__dirname, '../client/build/index.html'));
});
// Start server
app.listen(PORT, () => {