build
All checks were successful
Build & Deploy / deploy (push) Successful in 44s

This commit is contained in:
2026-01-16 12:51:29 +01:00
parent a40ce95a6a
commit 5e74605d2d
3 changed files with 11 additions and 15 deletions

View File

@@ -1,6 +1,5 @@
import express from 'express';
import path from 'path';
import { fileURLToPath } from 'url';
import nodemailer from 'nodemailer';
import cors from 'cors';
import dotenv from 'dotenv';
@@ -9,9 +8,6 @@ import rateLimit from 'express-rate-limit';
dotenv.config();
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const app = express();
const PORT = process.env.PORT || 3000;
@@ -97,12 +93,12 @@ app.get('/health', (req, res) => {
});
// Serve static files from the React app
const distPath = path.join(__dirname, 'dist/frontend');
const distPath = path.join(process.cwd(), 'dist/frontend');
app.use(express.static(distPath));
// The "catchall" handler: for any request that doesn't
// match one above, send back React's index.html file.
app.get('*', (req, res) => {
app.get('(.*)', (req, res) => {
res.sendFile(path.join(distPath, 'index.html'));
});