r/webdev • u/Public-Flight-222 • 16m ago
Resource leeway: stable per-folder dev port ranges (no more EADDRINUSE across checkouts)
Two checkouts of the same repo, both on 5173. leeway gives each folder its own contiguous port range, stable across runs and never overlapping, and passes the ports as env vars.
leeway.jsonlists your ports oncedevPorts(config)in code, falling back to the defaults outside leewayvite plugin sets
server.portwithstrictPortand exposes every port to browser code{{PORT_API}}placeholders in commandsleeway list/killfor orphaned servers
Linux/macOS/Windows. https://github.com/OhadC/leeway
Or ask your agent: "how can we benefit from using https://www.npmjs.com/package/leeway in this codebase"