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:
+4
-3
@@ -7,10 +7,11 @@ Run it:
|
||||
|
||||
```sh
|
||||
make -f example/example.mk example
|
||||
./build/example/living-server 8080
|
||||
./build/example/living-server 8000
|
||||
```
|
||||
|
||||
Open `http://127.0.0.1:8080/` and click through the matrix; `/stats` has the
|
||||
The server listens on all interfaces. Open `http://127.0.0.1:8000/` (or the
|
||||
machine's LAN address) and click through the matrix; `/stats` has the
|
||||
charts (Chart.js is embedded in the binary, no CDN). Narrow the
|
||||
window to 360px: the top nav collapses into a dropdown menu.
|
||||
|
||||
@@ -29,7 +30,7 @@ routes (`/hello/{name}`, `/di/resolve/{name}`, `/tenancy/t/{tenant}/whoami`,
|
||||
|
||||
```sh
|
||||
pip install locust
|
||||
locust -f example/locustfile.py --host http://127.0.0.1:8080
|
||||
locust -f example/locustfile.py --host http://127.0.0.1:8000
|
||||
```
|
||||
|
||||
Open the Locust web UI at `http://localhost:8089` (linked as `locust` in
|
||||
|
||||
Reference in New Issue
Block a user