fix: add root redirect to /docs and show localhost in serve output
This commit is contained in:
+2
-1
@@ -72,7 +72,8 @@ def search(query: str, top_k: int = 10):
|
||||
@app.command()
|
||||
def serve(port: int = 8000):
|
||||
"""启动 HTTP 服务."""
|
||||
typer.echo(f"🚀 启动服务: http://0.0.0.0:{port}")
|
||||
typer.echo(f"🚀 启动服务: http://localhost:{port}")
|
||||
typer.echo(f"📖 API 文档: http://localhost:{port}/docs")
|
||||
uvicorn.run("src.server.app:app", host="0.0.0.0", port=port, reload=False)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user