Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BC-7101 - collaboration service deployment #3234

Merged
merged 11 commits into from
May 7, 2024
Merged
18 changes: 8 additions & 10 deletions src/modules/data/board/socket/socket.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
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;

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(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,
};
Loading