Skip to content

Commit

Permalink
fix: removing envConfig from socket-connection
Browse files Browse the repository at this point in the history
  • Loading branch information
hoeppner-dataport committed May 7, 2024
1 parent 21a1c5e commit 899bd45
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/modules/data/board/socket/socket.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { io } from "socket.io-client";
import { Action } from "@/types/board/ActionFactory";
import { envConfigModule } from "@/store";

const BOARD_COLLABORATION_URI = envConfigModule.getEnv.BOARD_COLLABORATION_URI;
const BOARD_COLLABORATION_URI = process.env.KUBERNETES_SERVICE_PORT
? "" // pointing to the same host for websocket-requests
: "ws://localhost:4450"; // default for local development

export const useBoardSocketApi = (dispatch: (action: Action) => void) => {
const socket = io(BOARD_COLLABORATION_URI, {
Expand Down

0 comments on commit 899bd45

Please sign in to comment.