Files
karate_halloween/scripts/check_ports.py
T

9 lines
241 B
Python

import requests
for port in [3000, 3001, 34821]:
try:
r = requests.get(f"http://localhost:{port}", timeout=2)
print(f"Port {port}: {r.status_code}")
except Exception as e:
print(f"Port {port}: failed ({e})")