Enhance run-aspire.cmd to support Tailscale integration for remote access. The script now checks for Tailscale availability and connection status, providing warnings if not found or connected. Updated documentation in AGENTS.md and README.md to reflect changes, including instructions for using Tailscale with the Vite client. Fixed Vite configuration to pin the client port to 5173 and support HMR over Tailscale. Adjusted AppHost.cs to ensure proper endpoint targeting for Tailscale.
ci / server (push) Failing after 3m45s
ci / client (push) Successful in 17s

This commit is contained in:
Leonid Pershin
2026-08-20 10:02:42 +03:00
parent 51b4c22b69
commit cb869e4977
5 changed files with 68 additions and 6 deletions
+5 -4
View File
@@ -54,13 +54,14 @@ dotnet run --project src/HSchool.AppHost
```
`run-aspire.cmd` is the Windows entry point: it skips MSBuild when AppHost and Server dlls are
newer than C# / csproj / props. Pass `--rebuild` to force a build. Keep the script in sync with
`tools/apphost-uptodate.ps1` if the AppHost path ever moves.
newer than C# / csproj / props. Pass `--rebuild` to force a build. When `tailscale` is on PATH
it also runs `tailscale serve --bg 5173` when `tailscale` is on PATH and connected; otherwise
it warns and continues locally only. Pass `--no-tailscale` to skip Serve. Keep the script in sync
with `tools/apphost-uptodate.ps1` if the AppHost path ever moves.
`dotnet run --project src/HSchool.AppHost` still compiles every time — that is for a dirty tree,
not a fast relaunch. It starts the server *and* the Vite dev server and opens the Aspire
dashboard. The Vite port is assigned per run (`npm run dev -- --port <random>`), so read the
client URL off the dashboard instead of assuming 5173.
dashboard. The Vite client listens on port **5173** (pinned in AppHost for Tailscale Serve).
Do not start a dev server with a bare `npm run dev` when you meant to run the whole app — the
client only finds the backend through the Aspire-injected `SERVER_HTTP` environment variable, or