Remove unused APP_HOST/APP_PORT settings

This commit is contained in:
2026-09-04 00:21:57 +00:00
parent 9523f357df
commit 48791d1cf5
3 changed files with 3 additions and 10 deletions
-4
View File
@@ -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
+3 -2
View File
@@ -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
-4
View File
@@ -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"),