From 9a83a589c052959b9f048a2e6e3fbe45df931b96 Mon Sep 17 00:00:00 2001 From: James Wampler Date: Wed, 12 Aug 2026 17:06:37 -0700 Subject: [PATCH] Add run.sh to launch AppHost and open the web client Waits for the Vite dev server to respond on :5173, then opens it in the default browser via xdg-open/open, falling back to printing the URL. --- run.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 run.sh diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..84b4d9b --- /dev/null +++ b/run.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash +set -euo pipefail + +cd "$(dirname "${BASH_SOURCE[0]}")" + +export DOTNET_ROOT="${DOTNET_ROOT:-/home/james/.dotnet}" + +WEB_URL="http://localhost:5173" + +open_browser() { + until curl -sf "$WEB_URL" >/dev/null 2>&1; do + sleep 1 + done + if command -v xdg-open >/dev/null 2>&1; then + xdg-open "$WEB_URL" >/dev/null 2>&1 & + elif command -v open >/dev/null 2>&1; then + open "$WEB_URL" >/dev/null 2>&1 & + else + echo "Open $WEB_URL in your browser" + fi +} + +open_browser & + +dotnet run --project src/Novelly.AppHost