Files
SpacetimeDB/run_standalone_temp.sh
Mario Montoya ae7fee64d4 Make optional to listen to pg wire protocol and param for the port (#3309)
# Description of Changes

As the title says.

Add `--pg-port NUM` to the `start` command

# API and ABI breaking changes

Before this, it was set to `5432` unconditionally.

Docs updated at https://github.com/clockworklabs/SpacetimeDB/pull/3302.

# Expected complexity level and risk
1

# Testing

- [x] Run smoke tests
2025-09-29 18:19:38 -04:00

26 lines
588 B
Bash
Executable File

#!/bin/bash
# Run a ephemeral database inside a `temp` folder
set -euo pipefail
cd "$(dirname "$0")"
cargo build -p spacetimedb-standalone
STDB_PATH="${STDB_PATH:-$(mktemp -d)}"
function cleanup {
echo "Removing ${STDB_PATH}"
rm -rf "$STDB_PATH"
}
trap cleanup EXIT
echo "DATABASE AT ${STDB_PATH}"
cargo run -p spacetimedb-standalone -- start \
--data-dir ${STDB_PATH} \
--jwt-pub-key-path "${STDB_PATH}/id_ecdsa.pub" \
--jwt-priv-key-path "${STDB_PATH}/id_ecdsa" \
--pg-port 5432 \
-l 127.0.0.1:3000 --enable-tracy