create consolex class for remote logging

This commit is contained in:
evanpelle
2024-12-18 11:50:31 -08:00
parent d0d5652b53
commit 642d5dc4ca
7 changed files with 52 additions and 70 deletions
+3 -2
View File
@@ -45,7 +45,7 @@ app.get('/lobbies', (req, res) => {
app.post('/private_lobby', (req, res) => {
const id = gm.createPrivateGame()
console.log('creating private lobby with id ${id}')
console.logx('creating private lobby with id ${id}')
res.json({
id: id
});
@@ -56,6 +56,7 @@ app.post('/archive_singleplayer_game', (req, res) => {
const gameRecord: GameRecord = req.body
const clientIP = req.ip || req.socket.remoteAddress || 'unknown'; // Added this line
if (!gameRecord) {
console.log('game record not found in request')
res.status(404).json({ error: 'Game record not found' });
@@ -78,7 +79,7 @@ app.post('/archive_singleplayer_game', (req, res) => {
})
app.post('/start_private_lobby/:id', (req, res) => {
console.log(`starting private lobby with id ${req.params.id}`)
console.logx(`starting private lobby with id ${req.params.id}`)
gm.startPrivateGame(req.params.id)
});