Skip to content

Commit

Permalink
chore: update sandbox
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanFlurry committed Sep 23, 2024
1 parent c231c8d commit f7ead39
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 17 deletions.
5 changes: 2 additions & 3 deletions sandbox/client/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import { Backend } from './dist/sdk.mjs';

const urlParams = new URLSearchParams(window.location.search);
const environment = urlParams.get('env') || 'local';
// const API_ENDPOINT = environment === 'remote' ? "https://sandbox-brq--staging.backend.nathan16.gameinc.io" : "http://localhost:6420";
const API_ENDPOINT = environment === 'remote' ? "https://unity-demo-c8y.backend.nathan16.gameinc.io" : "http://localhost:6420";
const API_ENDPOINT = environment === 'remote' ? "https://sandbox--staging.backend.rivet.gg" : "http://localhost:6420";

const backend = new Backend({ endpoint: API_ENDPOINT });

Expand Down Expand Up @@ -39,7 +38,7 @@ window.findOrCreateLobby = async function() {
const region = "atl";
const tags = {"foo": "bar"};
res = await backend.lobbies.findOrCreate({
version: "2024.08.14-4",
version: "2024.09.18-2",
regions: [region],
tags,
players: [{}],
Expand Down
4 changes: 4 additions & 0 deletions sandbox/deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions sandbox/rivet.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"runtime": {
"cors": {
"origins": [
"http://localhost:8080"
"http://127.0.0.1:8080"
]
}
},
Expand Down Expand Up @@ -31,9 +31,6 @@
"server": {
"environment": {
"SERVER_HOSTNAME": "0.0.0.0"
},
"tags": {

},
"ports": {
"game": {
Expand All @@ -53,7 +50,6 @@
"rivet": {
"registry": "local",
"config": {
"apiEndpoint": "https://api.nathan16.gameinc.io",
"serviceTokenVariable": "RIVET_SERVICE_TOKEN"
}
}
Expand Down
11 changes: 3 additions & 8 deletions 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 RIVET_BACKEND_ENDPOINT="https://sandbox-back-vlk--staging.backend.nathan16.gameinc.io"
export RIVET_BACKEND_ENDPOINT="https://sandbox--staging.backend.rivet.gg"

# Function to clean up background processes
cleanup() {
Expand All @@ -13,10 +13,5 @@ cleanup() {
# Trap Ctrl+C and call cleanup
trap cleanup INT TERM

# Run components
# ./scripts/run_local_backend.sh 2>&1 | sed 's/^/[BACKEND] /' &
# ./scripts/run_local_game_server.sh 2>&1 | sed 's/^/[GAME_SERVER] /' &
./scripts/run_local_client.sh 2>&1 | sed 's/^/[CLIENT] /' &

# Wait for all background processes to finish
wait
# Run client
./scripts/run_local_client.sh 2>&1 | sed 's/^/[CLIENT] /'
2 changes: 1 addition & 1 deletion tests/basic/test.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

curl -X POST "https://test-1-backe-1hv--staging.backend.nathan16.gameinc.io/modules/auth/scripts/send_email_verification/call" \
curl -X POST "https://sandbox--staging.backend.rivet.gg/modules/auth/scripts/send_email_verification/call" \
-H "Content-Type: application/json" \
-d '{
"email": "test@rivet.gg"
Expand Down

0 comments on commit f7ead39

Please sign in to comment.