veltrixcode commited on
Commit
ca0aa5d
·
verified ·
1 Parent(s): 7568af0

Update server.js

Browse files
Files changed (1) hide show
  1. server.js +3 -3
server.js CHANGED
@@ -48,7 +48,7 @@ app.use(cors());
48
  app.use(express.json());
49
 
50
  // Serve static files from React build directory
51
- app.use(express.static(path.join(__dirname, 'build')));
52
 
53
  // Store logs in memory (in production, use a database)
54
  let serverLogs = [];
@@ -258,7 +258,7 @@ app.get('/', (req, res) => {
258
  userAgent: req.get('User-Agent'),
259
  ip: req.ip
260
  });
261
- res.sendFile(path.join(__dirname, 'build', 'index.html'));
262
  });
263
 
264
  // API Routes
@@ -763,7 +763,7 @@ app.get('*', (req, res) => {
763
  ip: req.ip
764
  });
765
 
766
- res.sendFile(path.join(__dirname, 'build', 'index.html'));
767
  });
768
 
769
  // Socket.IO connection handling
 
48
  app.use(express.json());
49
 
50
  // Serve static files from React build directory
51
+ app.use(express.static(path.join(__dirname, 'public')));
52
 
53
  // Store logs in memory (in production, use a database)
54
  let serverLogs = [];
 
258
  userAgent: req.get('User-Agent'),
259
  ip: req.ip
260
  });
261
+ res.sendFile(path.join(__dirname, 'public', 'index.html'));
262
  });
263
 
264
  // API Routes
 
763
  ip: req.ip
764
  });
765
 
766
+ res.sendFile(path.join(__dirname, 'public', 'index.html'));
767
  });
768
 
769
  // Socket.IO connection handling