logging update
This commit is contained in:
@@ -26,12 +26,15 @@ app.prepare().then(() => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
io.on('connection', (socket: Socket) => {
|
io.on('connection', (socket: Socket) => {
|
||||||
console.log(Date.now(), `Client connected: ${socket.id}`);
|
//console.log(Date.now(), `Client connected: ${socket.id}`);
|
||||||
|
|
||||||
socket.on('start', () => {
|
socket.on('start', () => {
|
||||||
const gameUpdate = gameStore.createGame(socket.id);
|
const gameUpdate = gameStore.createGame(socket.id);
|
||||||
|
|
||||||
console.log(Date.now(), `Socket ${socket.id} started game ${gameUpdate.dmID}`);
|
console.log(
|
||||||
|
Date.now(),
|
||||||
|
`Socket ${socket.id} started game ${gameUpdate.dmID}/${gameUpdate.spectatorID}`,
|
||||||
|
);
|
||||||
|
|
||||||
socket.emit('new-game', gameUpdate);
|
socket.emit('new-game', gameUpdate);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user