summaryrefslogtreecommitdiffhomepage
path: root/packaging
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-06-02 19:02:43 +0900
committerAdam Malczewski <[email protected]>2026-06-02 19:02:43 +0900
commit94ce3401cd65ff3f58c134c73cb3f816b7142093 (patch)
tree4b3119ba5a783b0dfba152c6953e832857785933 /packaging
parent062d01bd2f5c3ab6de7747dc5028e66b81dac6f5 (diff)
downloaddispatch-94ce3401cd65ff3f58c134c73cb3f816b7142093.tar.gz
dispatch-94ce3401cd65ff3f58c134c73cb3f816b7142093.zip
feat(api): fall back to next port (3000→3010) when the port is in use
The API server bound a fixed port (3000) and died with EADDRINUSE when it was taken — painful when running multiple dispatch instances (e.g. testing several feature branches at once). Replace the static default export with an explicit Bun.serve retry loop that increments the port by one on EADDRINUSE, from START_PORT (PORT env or 3000) up to MAX_PORT (3010), logging the chosen port and a hint to repoint the frontend's API URL on a bump. Guarded by import.meta.main so importing the module (for `app`) never binds a port. Frontend unchanged — set its API URL manually when a bump occurs.
Diffstat (limited to 'packaging')
0 files changed, 0 insertions, 0 deletions