diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-07-23 15:13:17 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-07-23 15:13:17 +0200 |
| commit | a600efbe3f3d2c29e3aa6e7877937a29429b9a1e (patch) | |
| tree | e471123b0356e40af246842eff9223e7bb935464 /internal/config | |
| parent | aa6c9dad764089a3f0e287b5f90937e97dde3921 (diff) | |
| download | lectio-a600efbe3f3d2c29e3aa6e7877937a29429b9a1e.tar.gz lectio-a600efbe3f3d2c29e3aa6e7877937a29429b9a1e.zip | |
web: default lectio-web to port 1099 with free-port fallback
chooseListener(port) factors the listen logic out of Run: port==0 now
tries defaultWebPort (1099) first and only falls back to an OS-picked
free port if 1099 is taken; a non-zero port is still bound exactly,
surfacing its bind error as before. config.Default() keeps WebPort: 0
unchanged (0 still means "auto"). Adds TestChooseListener, robust to
sandboxes that can't bind 1099 or :0 (t.Skip instead of failing).
Also folds the ?ref= whitespace trim into renderLookup itself so GET /
and GET /lookup treat a whitespace-only ref identically (previously
only lookupHandler trimmed it).
Diffstat (limited to 'internal/config')
| -rw-r--r-- | internal/config/config.toml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/config/config.toml b/internal/config/config.toml index 9c379e7..cfcb85b 100644 --- a/internal/config/config.toml +++ b/internal/config/config.toml @@ -7,7 +7,7 @@ width = 0 # CLI wrap width; 0 = detect terminal all = false # default to all parts (true) or just the gospel (false) offline = false # true = never fetch; read only harvested sigla + cache web_theme = "transfiguration" # built-in order/season theme or a user theme in ~/.config/lectio/themes/ -web_port = 0 # lectio-web port; 0 = auto-pick a free port +web_port = 0 # lectio-web port; 0 = try 1099, then any free port web_display = "horizontal" # lectio-web layout: "horizontal" (stacked), "vertical" (columns), "interlinear" (verse-by-verse) # Which parts to show. Both tables are commented out -> every part is shown. |
