moq-rs/dev/clock

20 lines
422 B
Plaintext
Raw Normal View History

2023-11-07 06:41:15 +00:00
#!/bin/bash
set -euo pipefail
# Change directory to the root of the project
cd "$(dirname "$0")/.."
# Use debug logging by default
export RUST_LOG="${RUST_LOG:-debug}"
# Connect to localhost by default.
HOST="${HOST:-localhost}"
PORT="${PORT:-4443}"
ADDR="${ADDR:-$HOST:$PORT}"
NAME="${NAME:-clock}"
# Combine the host and name into a URL.
URL="${URL:-"https://$ADDR/$NAME"}"
cargo run --bin moq-clock -- "$URL" "$@"