Skip to content

Commit

Permalink
chore(lobbies): rename BACKEND_ENDPOINT -> RIVET_BACKEND_ENDPOINT
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanFlurry committed Sep 30, 2024
1 parent 27e435a commit b295fab
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion modules/lobbies/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion modules/lobbies/actors/lobby_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ export class Actor extends ActorBase<undefined, State.StateVersioned> {
"LOBBY_ID": lobby.id,
"LOBBY_VERSION": lobby.version,
"LOBBY_TOKEN": token,
"BACKEND_ENDPOINT": ctx.runtime.publicEndpoint,
"RIVET_BACKEND_ENDPOINT": ctx.runtime.publicEndpoint,
}),
},
network: {
Expand Down
4 changes: 2 additions & 2 deletions sandbox/game_server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });

Expand Down
2 changes: 1 addition & 1 deletion sandbox/scripts/fetch_state.ts
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion sandbox/scripts/reset_state.ts
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 2 additions & 2 deletions sandbox/scripts/run_local.sh
Original file line number Diff line number Diff line change
@@ -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() {
Expand All @@ -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
wait
2 changes: 1 addition & 1 deletion sandbox/scripts/run_remote.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
4 changes: 2 additions & 2 deletions tests/basic/server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down

0 comments on commit b295fab

Please sign in to comment.