#!/bin/bash
# Starts crashnet-server against the game directory you supply.
# Usage: ./start.sh path/to/game_folder
set -e
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
if [ -z "$1" ]; then
    echo "Usage: $0 <game_folder-or-.crashcart>"
    exit 1
fi
# --simulation skips JWT auth — fine for local testing. Remove for prod.
exec "$DIR/crashnet-server" --simulation --addr 127.0.0.1:9005 "$@"
