MCPcopy Create free account
hub / github.com/LaunchPlatform/beanhub-cli / run_server

Function run_server

beanhub_cli/forms/main.py:148–161  ·  view source on GitHub ↗
(
    env: Environment, port: int, host: str, open_browser: bool, uvicorn_log_level: str
)

Source from the content-addressed store, hash-verified

146)
147@pass_env
148def run_server(
149 env: Environment, port: int, host: str, open_browser: bool, uvicorn_log_level: str
150):
151 app = make_app()
152
153 def after_startup():
154 if open_browser:
155 url = f"http://{host}:{port}"
156 env.logger.info("Opening URL %s in the browser", url)
157 webbrowser.open(url)
158
159 config = uvicorn.Config(app=app, port=port, host=host, log_level=uvicorn_log_level)
160 server = StartupCallbackServer(config=config, startup_callback=after_startup)
161 server.run()

Callers

nothing calls this directly

Calls 2

make_appFunction · 0.50

Tested by

no test coverage detected