feat: add dedicated douyin workbench entry

This commit is contained in:
kris
2026-03-21 04:57:18 +08:00
parent 9f921fff94
commit 7171dae91c
5 changed files with 148 additions and 17 deletions

View File

@@ -0,0 +1,20 @@
#!/bin/sh
set -eu
PORT="${DOUYIN_WORKBENCH_PORT:-3618}"
if ! lsof -nP -iTCP:"$PORT" -sTCP:LISTEN >/dev/null 2>&1; then
echo "douyin workbench stopped"
exit 1
fi
python3 - <<'PY'
import os
import urllib.request
port = os.environ.get("PORT", "3618")
for path in ("/workbench", "/"):
url = f"http://127.0.0.1:{port}{path}"
with urllib.request.urlopen(url, timeout=5) as resp:
print(f"{path}: {resp.status}")
PY