Currently there is no way to tell esbuild to pick a truly random port in serve mode - if port is unset or set to 0 then port in 8000-8009 range gets picked up. Ideally if port is set to 0 then this would just be passed to Go listen implementation and it would pick a free random port.