fix: bind living example on all interfaces, default port 8000

The example server bound 127.0.0.1 only, so it was unreachable from
other hosts, and defaulted to 8080. It now binds 0.0.0.0 on 8000
(README, Makefile deploy and locust targets updated to match).

Also: a leading --flag no longer gets parsed as the port, so
'living-server --no-locust' starts instead of exiting with 'bad port'.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-26 04:15:09 +01:00
co-authored by Claude Haiku 5.5
parent 9c4a4ac7e4
commit a2a737e21d
4 changed files with 14 additions and 13 deletions
+2 -2
View File
@@ -132,7 +132,7 @@ example-test: example
example-locust:
python3 $(EXAMPLE_DIR)/check_locust_coverage.py
locust -f $(EXAMPLE_DIR)/locustfile.py --host $${LOCUST_HOST:-http://127.0.0.1:8080} --headless -u $${LOCUST_USERS:-10} -r $${LOCUST_RATE:-2} -t $${LOCUST_TIME:-30s}
locust -f $(EXAMPLE_DIR)/locustfile.py --host $${LOCUST_HOST:-http://127.0.0.1:8000} --headless -u $${LOCUST_USERS:-10} -r $${LOCUST_RATE:-2} -t $${LOCUST_TIME:-30s}
example-clean:
rm -rf $(EXAMPLE_BUILD)
@@ -140,7 +140,7 @@ example-clean:
# Deploy: loopback single binary (AGENTS.md "Deploy"). Restarts the server from
# build/ with a pid file; fails if it is not healthy within 15 s. Runs from
# the repo root so .env.json(.local) and example/static resolve.
EXAMPLE_PORT ?= 8080
EXAMPLE_PORT ?= 8000
EXAMPLE_RUN = $(EXAMPLE_BUILD)/run
example-deploy: example