From a600efbe3f3d2c29e3aa6e7877937a29429b9a1e Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Thu, 23 Jul 2026 15:13:17 +0200 Subject: 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). --- internal/config/config.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/config/config.toml') 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. -- cgit v1.3