feat(cloud-api): add workspace application entrypoint

This commit is contained in:
2026-07-12 16:41:17 +08:00
parent 47dfc3b8c5
commit 2af8909b29
8 changed files with 88 additions and 2 deletions
+20
View File
@@ -0,0 +1,20 @@
from __future__ import annotations
import argparse
from collections.abc import Sequence
def main(argv: Sequence[str] | None = None) -> None:
parser = argparse.ArgumentParser(description="Run the Device Cloud API")
parser.add_argument("--host", default="127.0.0.1")
parser.add_argument("--port", default=8001, type=int)
args = parser.parse_args(argv)
import uvicorn
uvicorn.run(
"cloud_api.app:create_app",
factory=True,
host=args.host,
port=args.port,
)