Spaces:
Paused
Paused
Update server.js
Browse files
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, '
|
| 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, '
|
| 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, '
|
| 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
|