Skip to content

Commit

Permalink
fix: replace console log with logger
Browse files Browse the repository at this point in the history
  • Loading branch information
Meriem-BM committed Aug 22, 2024
1 parent bf37bc7 commit 97b0cec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/services/ws/webSocketServer.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import WebSocket from 'ws';
import { logger } from '../../utils/logger';

export function startWebSocketServer(server) {
const wss = new WebSocket.Server({ server });

// Handle WebSocket connections
wss.on('connection', ws => {
ws.on('message', message => {
console.log('Received:', message);
logger.info(`Received message: ${message}`);
});
});

Expand Down

0 comments on commit 97b0cec

Please sign in to comment.