mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 04:59:37 +08:00
feat: add deeptutor start command to launch backend and frontend together
Add a `start` CLI command that delegates to scripts/start_web.py so users can launch the full web app with a single command instead of manually running `python scripts/start_web.py`.
This commit is contained in:
@@ -103,6 +103,17 @@ def run_capability(
|
||||
maybe_run(run_turn_and_render(app=DeepTutorApp(), request=request, fmt=fmt))
|
||||
|
||||
|
||||
@app.command()
|
||||
def start() -> None:
|
||||
"""Launch backend + frontend together."""
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
script = str(Path(__file__).resolve().parent.parent / "scripts" / "start_web.py")
|
||||
subprocess.run([sys.executable, script])
|
||||
|
||||
|
||||
@app.command()
|
||||
def serve(
|
||||
host: str = typer.Option("0.0.0.0", help="Bind address."),
|
||||
|
||||
Reference in New Issue
Block a user