Repository navigation
Commit 93998d7
fix(frontend): derive API base URL from daemon port, drop hardcoded 3001
The daemon binds AO_PORT (default 3001) and writes the actual port to
running.json. Baking http://127.0.0.1:3001 into the client meant any user
overriding AO_PORT would silently hit the wrong address. Replace the
pre-built constant-port client with a createApiClient(baseUrl) factory plus
a baseURLForPort helper, so the wiring layer passes the port discovered from
running.json (via IPC). DEFAULT_PORT remains only as a documented fallback.
Co-Authored-By: Claude Opus 4.8 <[email protected]>1 parent c5d667f commit 93998d7
1 file changed
Lines changed: 19 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
8 | 23 | | |
9 | 24 | | |
10 | 25 | | |
| |||
0 commit comments