INNER CODE UNIT · Python
run_as_web_server
rio-labs/rio · rio/app.py:823
def run_as_web_server(
self,
*,
host: str = "localhost",
port: int = 8000,
quiet: bool = False,
base_url: rio.URL | str | None = None,
) -> None:
"""
Creates and runs a webserver that serves this app.
This method creates and immediately runs a webserver that serves this
app. This is the simplest way to run a Rio app.
```py
app = rio.App(
name="My App",
build=MyAppRoot,