(id: string)
| 221 | /** Deterministic-ish port in the 5000–5499 range — DISJOINT from previewPort's 4500–4999 |
| 222 | * so a live server and a static preview for the same id don't collide. */ |
| 223 | export function livePort(id: string): number { |
| 224 | let h = 0; |
| 225 | for (let i = 0; i < id.length; i++) h = (h * 31 + id.charCodeAt(i)) >>> 0; |
| 226 | return 5000 + (h % 500); |
| 227 | } |