diff --git a/modules/lobbies/README.mdx b/modules/lobbies/README.mdx index aa56468e..54b6b198 100644 --- a/modules/lobbies/README.mdx +++ b/modules/lobbies/README.mdx @@ -634,7 +634,7 @@ The following environment variables are automatically set for each lobby: - `LOBBY_ID` A unique identifier for the lobby. This is a UUID string. - `LOBBY_VERSION` The version of the lobby, as specified in the lobby configuration. - `LOBBY_TOKEN` A secure token used for authenticating the lobby with the OpenGB backend. -- `BACKEND_ENDPOINT` The public endpoint URL for the OpenGB backend. +- `RIVET_BACKEND_ENDPOINT` The public endpoint URL for the OpenGB backend. {/* ## FAQ diff --git a/modules/lobbies/actors/lobby_manager.ts b/modules/lobbies/actors/lobby_manager.ts index 1e48958b..cf5f3d1b 100644 --- a/modules/lobbies/actors/lobby_manager.ts +++ b/modules/lobbies/actors/lobby_manager.ts @@ -586,7 +586,7 @@ export class Actor extends ActorBase { "LOBBY_ID": lobby.id, "LOBBY_VERSION": lobby.version, "LOBBY_TOKEN": token, - "BACKEND_ENDPOINT": ctx.runtime.publicEndpoint, + "RIVET_BACKEND_ENDPOINT": ctx.runtime.publicEndpoint, }), }, network: { diff --git a/sandbox/game_server/src/index.ts b/sandbox/game_server/src/index.ts index 1d79dcce..92f81aed 100644 --- a/sandbox/game_server/src/index.ts +++ b/sandbox/game_server/src/index.ts @@ -20,10 +20,10 @@ console.log(process.env); logTimestamp('start'); -const BACKEND_ENDPOINT = process.env.BACKEND_ENDPOINT; +const BACKEND_ENDPOINT = process.env.RIVET_BACKEND_ENDPOINT; const LOBBY_ID = process.env.LOBBY_ID ?? "00000000-0000-0000-0000-000000000000"; const LOBBY_TOKEN= process.env.LOBBY_TOKEN; -if (!BACKEND_ENDPOINT) throw new Error("BACKEND_ENDPOINT"); +if (!BACKEND_ENDPOINT) throw new Error("RIVET_BACKEND_ENDPOINT"); const backend = new Backend({ endpoint: BACKEND_ENDPOINT }); diff --git a/sandbox/scripts/fetch_state.ts b/sandbox/scripts/fetch_state.ts index b251a471..1b47d82e 100755 --- a/sandbox/scripts/fetch_state.ts +++ b/sandbox/scripts/fetch_state.ts @@ -1,6 +1,6 @@ #!/usr/bin/env -S deno run -A -const endpoint = Deno.env.get("BACKEND_ENDPOINT"); +const endpoint = Deno.env.get("RIVET_BACKEND_ENDPOINT"); const res = await fetch(`${endpoint}/modules/lobbies/scripts/fetch_lobby_manager_state/call`, { method: "POST", diff --git a/sandbox/scripts/reset_state.ts b/sandbox/scripts/reset_state.ts index 11700b5f..bc787624 100755 --- a/sandbox/scripts/reset_state.ts +++ b/sandbox/scripts/reset_state.ts @@ -1,6 +1,6 @@ #!/usr/bin/env -S deno run -A -const endpoint = Deno.env.get("BACKEND_ENDPOINT"); +const endpoint = Deno.env.get("RIVET_BACKEND_ENDPOINT"); const res = await fetch(`${endpoint}/modules/lobbies/scripts/reset_lobby_manager_state/call`, { method: "POST", diff --git a/sandbox/scripts/run_local.sh b/sandbox/scripts/run_local.sh index ce46b80e..047cf2b1 100755 --- a/sandbox/scripts/run_local.sh +++ b/sandbox/scripts/run_local.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -euo pipefail -export BACKEND_ENDPOINT="http://127.0.0.1:6420" +export RIVET_BACKEND_ENDPOINT="http://127.0.0.1:6420" # Function to clean up background processes cleanup() { @@ -27,4 +27,4 @@ echo "Backend started" ./scripts/run_local_client.sh 2>&1 | sed 's/^/[CLIENT] /' & # Wait for all background processes to finish -wait \ No newline at end of file +wait diff --git a/sandbox/scripts/run_remote.sh b/sandbox/scripts/run_remote.sh index 1dbb8ffe..47d9bed2 100755 --- a/sandbox/scripts/run_remote.sh +++ b/sandbox/scripts/run_remote.sh @@ -2,7 +2,7 @@ set -euo pipefail -export BACKEND_ENDPOINT="https://sandbox-back-vlk--staging.backend.nathan16.gameinc.io" +export RIVET_BACKEND_ENDPOINT="https://sandbox-back-vlk--staging.backend.nathan16.gameinc.io" # Function to clean up background processes cleanup() { diff --git a/tests/basic/server/src/index.ts b/tests/basic/server/src/index.ts index 1d24acd6..4ec16b71 100644 --- a/tests/basic/server/src/index.ts +++ b/tests/basic/server/src/index.ts @@ -20,9 +20,9 @@ console.log(process.env); logTimestamp('start'); -const BACKEND_ENDPOINT = process.env.BACKEND_ENDPOINT; +const BACKEND_ENDPOINT = process.env.RIVET_BACKEND_ENDPOINT; const LOBBY_TOKEN= process.env.LOBBY_TOKEN; -if (!BACKEND_ENDPOINT) throw new Error("BACKEND_ENDPOINT"); +if (!BACKEND_ENDPOINT) throw new Error("RIVET_BACKEND_ENDPOINT"); if (!LOBBY_TOKEN) throw new Error("LOBBY_TOKEN"); const backend = new Backend({ endpoint: BACKEND_ENDPOINT });