fix: separate server and client for cu mode

This commit is contained in:
tresabhi committed 2026-05-05 17:43:12 -05:00
1 parent a218c791a9
commit 16c77f587a
7 files changed
+17 -12

No files matched your search

+3 -5
View File
@@ -1,13 +1,11 @@
import { assertSecret } from "@blitzkit/core";
import { GameInterface } from "@blitzkit/game";
export const clientUnmounted = !("WOTB_CLIENT" in import.meta.env);
import { clientUnmounted } from "./unmounted";
let _game: GameInterface | null = null;
if (!clientUnmounted) {
_game = new GameInterface(import.meta.env.WOTB_CLIENT);
} else {
console.warn("Running in client denied mode...");
_game = new GameInterface(assertSecret(import.meta.env.PUBLIC_WOTB_CLIENT));
}
export const game = _game;
@@ -0,0 +1,5 @@
export const clientUnmounted = !("PUBLIC_WOTB_CLIENT" in import.meta.env);
if (clientUnmounted) {
console.warn("Running in client denied mode...");
}