Skip to content

Commit 8bdc246

Browse files
committed
Fixed nextjs variable passing on build and ws
1 parent dab43e8 commit 8bdc246

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

apps/ws-server/src/index.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ wss.on("connection", async (socket: WebSocket, req: Request) => {
2424
const searchParams = new URLSearchParams(req.url.split("?")[1]);
2525
const token = searchParams.get("token");
2626

27-
console.log("token", token);
2827
userVerificationStatus.set(socket, { verified: false });
2928

3029
socket.on("message", async (data) => {
@@ -41,8 +40,6 @@ wss.on("connection", async (socket: WebSocket, req: Request) => {
4140
}
4241

4342
const recievedData = JSON.parse(data as unknown as string);
44-
45-
console.log(recievedData);
4643
const validMessage = WebSocketMessageSchema.safeParse(recievedData);
4744

4845
if (!validMessage.success) {
@@ -56,8 +53,6 @@ wss.on("connection", async (socket: WebSocket, req: Request) => {
5653
return;
5754
}
5855

59-
console.log(validMessage.data);
60-
6156
switch (validMessage.data.type) {
6257
case "connect_room":
6358
activeRooms.set(validMessage.data.roomId!, [

docker-compose.deployment.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ services:
2323
args:
2424
- DATABASE_URL=postgresql://harshit:password@postgres:5432/meetdraw
2525
- NEXT_PUBLIC_HTTP_URL=http://backend:3001/api/v1
26-
- NEXT_PUBLIC_WS_URL=ws://ws:8080/
26+
- NEXT_PUBLIC_WS_URL=ws://localhost:8080/
2727
ports:
2828
- "3000:3000"
2929
environment:
3030
- NEXT_PUBLIC_HTTP_URL=http://backend:3001/api/v1
31-
- NEXT_PUBLIC_WS_URL=ws://ws:8080/
31+
- NEXT_PUBLIC_WS_URL=ws://localhost:8080/
3232
- DATABASE_URL=postgresql://harshit:password@postgres:5432/meetdraw
3333
depends_on:
3434
- backend

0 commit comments

Comments
 (0)