INNER CODE UNIT · Python
serve
Chanchaldhiman/CANviz · backend/canviz/cli.py:136
def serve(
interface: InterfaceOpt = "gs_usb",
channel: ChannelOpt = "",
index: IndexOpt = 0,
bitrate: BitrateOpt = 500_000,
baudrate: BaudrateOpt = 115_200,
host: Annotated[str, typer.Option("--host", help="Host to bind")] = "127.0.0.1",
port: Annotated[int, typer.Option("--port", help="Port to listen on")] = 8080,
headless: Annotated[bool, typer.Option("--headless", help="Start API only - do not open a browser")] = False,
no_browser: Annotated[bool, typer.Option("--no-browser", hidden=True)] = False,
j1939: Annotated[bool, typer.Option("--j1939", help="Auto-enable J1939 decoder after connect")] = False,
log_level: Annotated[str, typer.Option("--log-level")] = "info",
) -> None:
"""Start the CANviz web server and (optionally) open a browser."""
_run_serve(
interface=interface,
channel=channel,
index=index,