Skip to content

Commit 56d621b

Browse files
committed
feat: Added rabbitmq to send events
1 parent f1571b5 commit 56d621b

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/libs/amqp.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const initAMQP = () => {
2727
channel.assertExchange(exchangeName, 'topic', { durable: false });
2828
amqpChannel = channel;
2929

30-
logger.log('AMQP initialized');
30+
logger.info('AMQP initialized');
3131
resolve();
3232
});
3333
});

src/libs/socket.server.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,21 @@ let io: SocketIO;
1111
const cors = configService.get<Cors>('CORS').ORIGIN;
1212

1313
export const initIO = (httpServer: Server) => {
14-
logger.verbose('Initializing Socket.io');
1514
io = new SocketIO(httpServer, {
1615
cors: {
1716
origin: cors,
1817
},
1918
});
2019

2120
io.on('connection', (socket) => {
22-
logger.verbose('Client connected');
21+
logger.info('User connected');
22+
2323
socket.on('disconnect', () => {
24-
logger.verbose('Client disconnected');
24+
logger.info('User disconnected');
2525
});
2626
});
2727

28+
logger.info('Socket.io initialized');
2829
return io;
2930
};
3031

0 commit comments

Comments
 (0)