Upload 3 files
Browse filesFiles changed (3)
- README.md+4-6
- app.pyAdded+43
- packages.txtAdded+2
123456789101112131415---title: DSH Antigravity Relayemoji: 🚀colorFrom: bluecolorTo: indigosdk: dockerapp_port: 7860pinned: false---# DSH Antigravity Cloud RelayZero-dependency self-hosted DSH Remote Relay Server for connecting `dsh-go` mobile app to your local Antigravity IDE from anywhere over the internet.Set `DSH_SERVER_ACCOUNT` and `DSH_SERVER_PASSWORD` (at least 12 characters) in your Space **Settings -> Variables and secrets**.12345678910111213---title: DSH Antigravity Relayemoji: 🚀colorFrom: bluecolorTo: indigosdk: gradioapp_file: app.pypinned: false---# DSH Antigravity Cloud RelayZero-dependency self-hosted DSH Remote Relay Server for connecting `dsh-go` mobile app to your local Antigravity IDE from anywhere over the internet.
12345678910111213141516171819202122232425262728293031323334353637383940414243import osimport sysimport subprocessimport urllib.requestimport time
print("[Launcher] Starting DSH Antigravity Relay launcher...")
def get_node(): try: res = subprocess.run(["node", "-v"], capture_output=True, text=True) if res.returncode == 0: print(f"[Launcher] Found system node: {res.stdout.strip()}") return "node" except Exception: pass
node_dir = os.path.abspath("./node_bin") node_exe = os.path.join(node_dir, "bin", "node") if os.path.exists(node_exe): return node_exe
os.makedirs(node_dir, exist_ok=True) tar_path = "/tmp/node.tar.xz" url = "https://nodejs.org/dist/v20.18.0/node-v20.18.0-linux-x64.tar.xz" print(f"[Launcher] Downloading portable Node.js from {url}...") urllib.request.urlretrieve(url, tar_path) print("[Launcher] Extracting Node.js...") subprocess.run(["tar", "-xJf", tar_path, "-C", node_dir, "--strip-components=1"], check=True) os.chmod(node_exe, 0o755) print(f"[Launcher] Node.js ready at {node_exe}") return node_exe
node_bin = get_node()port = os.environ.get("PORT", "7860")env = dict(os.environ)env["PORT"] = str(port)
print(f"[Launcher] Executing node server.mjs on port {port}...")# Hand off to node server.mjssys.stdout.flush()sys.stderr.flush()subprocess.run([node_bin, "server.mjs"], env=env)12nodejsnpmREADME.md+4-6
app.pyAdded+43
packages.txtAdded+2