incognitolm commited on
Commit
0d361fd
·
1 Parent(s): aca4793

Update index.js

Browse files
Files changed (1) hide show
  1. server/index.js +2 -2
server/index.js CHANGED
@@ -21,7 +21,7 @@ export const supabaseAnon = createClient(SUPABASE_URL, SUPABASE_ANON_KEY);
21
  const PORT = process.env.PORT || 7860;
22
  const app = express();
23
 
24
- app.use(express.static(path.join(__dirname, '..', 'public')));
25
  app.use(express.json({ limit: '10mb' }));
26
  // Require turnstile cookie for API routes (except the verification endpoint itself)
27
  app.use('/api', (req, res, next) => {
@@ -75,7 +75,7 @@ app.post('/api/turnstile', async (req, res) => {
75
 
76
  app.get('*', (req, res) => {
77
  if (!req.path.startsWith('/api/'))
78
- res.sendFile(path.join(__dirname, '..', 'public', 'index.html'));
79
  });
80
 
81
  const httpServer = createServer(app);
 
21
  const PORT = process.env.PORT || 7860;
22
  const app = express();
23
 
24
+ app.use(express.static('/public/public'));
25
  app.use(express.json({ limit: '10mb' }));
26
  // Require turnstile cookie for API routes (except the verification endpoint itself)
27
  app.use('/api', (req, res, next) => {
 
75
 
76
  app.get('*', (req, res) => {
77
  if (!req.path.startsWith('/api/'))
78
+ res.sendFile(path.join('/public/public', 'index.html'));
79
  });
80
 
81
  const httpServer = createServer(app);