9 lines
322 B
Python
9 lines
322 B
Python
import os
|
|
import subprocess
|
|
|
|
def run_caddy(port: int = 8086):
|
|
caddy_dir = os.path.join(os.getcwd(), "output", "vid_h264")
|
|
caddy_exe = os.path.join(os.path.dirname(__file__), "caddy_windows_amd64.exe")
|
|
|
|
subprocess.Popen([caddy_exe, "file-server", "--listen", f":{port}", "--browse"], cwd=caddy_dir, shell=True)
|