Skip to content

Commit

Permalink
BC-7101 - collaboration service deployment (#3234)
Browse files Browse the repository at this point in the history
Implement a deployment for the BoardCollaboration-WebSocket-Server.
* add configuration for board collaboration websocket uri
  • Loading branch information
hoeppner-dataport authored May 7, 2024
1 parent 4837f39 commit 8bbc549
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/modules/data/board/socket/socket.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
import { io } from "socket.io-client";
import { Action } from "@/types/board/ActionFactory";
import { envConfigModule } from "@/store";

export const useBoardSocketApi = (dispatch: (action: Action) => void) => {
// implement socket.io here
const socket = io(
// "https://bc-6683-poc-board-collaboration-server.dbc.dbildungscloud.dev",
"ws://localhost:4450",
{
path: "/collaboration",
withCredentials: true,
}
// { path: "/collaboration", transports: ["polling"] }
);
const socket = io(envConfigModule.getEnv.BOARD_COLLABORATION_URI, {
path: "/board-collaboration",
withCredentials: true,
});

socket.on("connect", function () {
console.log("connected");
});
Expand Down
6 changes: 6 additions & 0 deletions src/serverApi/v3/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1005,6 +1005,12 @@ export interface ConfigResponse {
* @memberof ConfigResponse
*/
FEATURE_MEDIA_SHELF_ENABLED: boolean;
/**
*
* @type {string}
* @memberof ConfigResponse
*/
BOARD_COLLABORATION_URI: string;
/**
*
* @type {boolean}
Expand Down
1 change: 1 addition & 0 deletions src/store/env-config-defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,6 @@ export const defaultConfigEnvs: ConfigResponse = {
FEATURE_SCHULCONNEX_COURSE_SYNC_ENABLED: false,
CTL_TOOLS_RELOAD_TIME_MS: 299000,
FEATURE_MEDIA_SHELF_ENABLED: false,
BOARD_COLLABORATION_URI: "ws://localhost:4450",
FEATURE_NEW_LAYOUT_ENABLED: true,
};

0 comments on commit 8bbc549

Please sign in to comment.