瀏覽代碼

exec: print the URL, not the address the server binds to (#1846)

Masen Furer 1 年之前
父節點
當前提交
0cd7242bb2
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      reflex/utils/exec.py

+ 2 - 2
reflex/utils/exec.py

@@ -85,10 +85,10 @@ def run_process_and_launch_url(run_command: list[str]):
             )
             )
         if process.stdout:
         if process.stdout:
             for line in processes.stream_logs("Starting frontend", process):
             for line in processes.stream_logs("Starting frontend", process):
-                match = re.search("ready started server on ([0-9.:]+)", line)
+                match = re.search("ready started server on ([0-9.:]+), url: (.*)", line)
                 if match:
                 if match:
                     if first_run:
                     if first_run:
-                        url = f"http://{match.group(1)}"
+                        url = match.group(2)
                         if get_config().frontend_path != "":
                         if get_config().frontend_path != "":
                             url = urljoin(url, get_config().frontend_path)
                             url = urljoin(url, get_config().frontend_path)
                         console.print(f"App running at: [bold green]{url}")
                         console.print(f"App running at: [bold green]{url}")