From 48791d1cf5c69471a9185d977727448391dd640f Mon Sep 17 00:00:00 2001 From: woggioni-opencode-agent Date: Fri, 4 Sep 2026 00:21:57 +0000 Subject: [PATCH] Remove unused APP_HOST/APP_PORT settings --- .env.example | 4 ---- README.md | 5 +++-- src/pyfconfig/config.py | 4 ---- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/.env.example b/.env.example index a94d022..6bb25b4 100644 --- a/.env.example +++ b/.env.example @@ -1,7 +1,3 @@ -# App server -APP_HOST=0.0.0.0 -APP_PORT=8000 - # Name used in the HTML page title/heading and the curl examples # (e.g. "ifconfig.me" when deployed under that domain). SITE_NAME=pyfconfig diff --git a/README.md b/README.md index 0c30bc6..17daad4 100644 --- a/README.md +++ b/README.md @@ -69,10 +69,11 @@ Environment variables (see `.env.example`): | Variable | Default | Description | |---|---|---| -| `APP_HOST` | `0.0.0.0` | Bind host (informational; granian is configured via `GRANIAN_*`) | -| `APP_PORT` | `8000` | Bind port (informational) | | `SITE_NAME` | `pyfconfig` | Public name used in the HTML page title and the curl examples (set to your domain, e.g. `ifconfig.example.com`) | +The bind address is configured through Granian itself (`GRANIAN_HOST` / +`GRANIAN_PORT` env vars or `--host` / `--port` CLI flags). + ## Tests ```bash diff --git a/src/pyfconfig/config.py b/src/pyfconfig/config.py index 81b97ce..af436b8 100644 --- a/src/pyfconfig/config.py +++ b/src/pyfconfig/config.py @@ -21,15 +21,11 @@ def _env(name: str, default: Optional[str] = None) -> str: @dataclass(frozen=True) class Settings: - app_host: str - app_port: int site_name: str @staticmethod def from_env() -> "Settings": return Settings( - app_host=_env("APP_HOST", "0.0.0.0"), - app_port=int(_env("APP_PORT", "8000")), # Public name of the deployment, used in the HTML page title # and in the command-line examples (e.g. "ifconfig.me"). site_name=_env("SITE_NAME", "pyfconfig"),