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.
This commit is contained in:
James Wampler
2026-08-12 17:06:37 -07:00
parent 23348327a9
commit 9a83a589c0
Executable
+25
View File
@@ -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