MCPcopy Create free account
hub / github.com/OpenOSINT/OpenOSINT / _handle_web

Function _handle_web

openosint/cli.py:604–619  ·  view source on GitHub ↗
(
    host: str = "0.0.0.0",
    port: int = 8080,
    no_browser: bool = False,
)

Source from the content-addressed store, hash-verified

602
603
604async def _handle_web(
605 host: str = "0.0.0.0",
606 port: int = 8080,
607 no_browser: bool = False,
608) -> None:
609 import threading
610 import webbrowser
611
612 from openosint.web_server import serve_async
613
614 if not no_browser:
615 display = "localhost" if host in ("0.0.0.0", "") else host
616 url = f"http://{display}:{port}"
617 threading.Timer(1.5, lambda: webbrowser.open(url)).start()
618
619 await serve_async(host=host, port=port)
620
621
622# ---------------------------------------------------------------------------

Callers 1

_async_mainFunction · 0.85

Calls 1

serve_asyncFunction · 0.90

Tested by

no test coverage detected