Skip to content

Commit

Permalink
feat: debug
Browse files Browse the repository at this point in the history
  • Loading branch information
marcos committed Mar 7, 2024
1 parent 4cee3ac commit 2c0b3c3
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ function checkEnv() {

params="$@"
if [ "x$params" = "xwait" ]; then

checkEnv RABBITMQ_HOST rabbitmq
checkEnv RABBITMQ_PORT 5672
node tools/wait.js $RABBITMQ_HOST $RABBITMQ_PORT
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vtru-studio-websocket",
"version": "1.1.12",
"version": "1.1.13",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 0 additions & 2 deletions src/controllers/preSignedURL/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ export const start = async () => {

channel?.bindQueue(logQueue, RABBITMQ_EXCHANGE_CREATORS, 'preSignedURL');

console.log(channel);

channel?.consume(logQueue, async (message) => {
console.log('message received:', message);
if (!message) return;
Expand Down
8 changes: 6 additions & 2 deletions src/features/login/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* eslint-disable no-param-reassign */
import debug from 'debug';
import { io } from '../../services';
import { TOKEN_ADMINS, TOKEN_CREATORS } from '../../constants';
import { RABBITMQ_URL, TOKEN_ADMINS, TOKEN_CREATORS } from '../../constants';
import type {
LoginParams,
MonitorCreatorsEmitParams,
Expand All @@ -16,7 +16,11 @@ export const login = ({ socket }: LoginParams) => {
socket.data.id = data.id;
socket.data.email = data.email;
console.log(
`Token received: ${data.token}
`
RabbitMQ PORT: ${process.env.RABBITMQ_PORT}
RabbitMQ HOST: ${process.env.RABBITMQ_HOST}
RABBITMQ_URL: ${RABBITMQ_URL}
Token received: ${data.token}
Token creators: ${TOKEN_CREATORS}
Token admins: ${TOKEN_ADMINS}`
);
Expand Down

0 comments on commit 2c0b3c3

Please sign in to comment.