fix(dev): proxy admin through portless api

This commit is contained in:
2026-07-09 12:33:30 +08:00
parent a83fb53ecd
commit 45d06f56cd
5 changed files with 12 additions and 3 deletions
+6
View File
@@ -84,6 +84,11 @@ stop_portless_route() {
pids="$(portless list 2>/dev/null | sed -nE "s#.*https://${name}[.]localhost.*[(]pid ([0-9]+)[)].*#\\1#p" || true)"
if [[ -z "$pids" ]]; then
if portless list 2>/dev/null | grep -q "https://${name}[.]localhost"; then
echo "Removing portless alias $name"
portless alias --remove "$name" >/dev/null 2>&1 || true
return
fi
echo "Portless route $name is not running."
return
fi
@@ -143,6 +148,7 @@ admin_url() {
stop_dev() {
stop_launchctl_job local.wygj.backend.dev
stop_launchctl_job local.wygj.admin.dev
stop_portless_route wygj-api
stop_port 8080
stop_portless_route wygj-admin