Last active
August 14, 2024 14:59
-
-
Save zdk/407f58803bb8d06729615ac66ada8a70 to your computer and use it in GitHub Desktop.
Test SRV record query with Bun
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as dns from "node:dns"; | |
import { $ } from 'bun'; | |
const addrs = await dns.promises.resolveSrv("_web1._tcp.mydomain.local"); | |
console.log(addrs); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
❯❯❯ time dig +short @127.0.0.1 -t SRV _web1._tcp.mydomain.local
0 5 7000 localhost.
dig +short @127.0.0.1 -t SRV _web1._tcp.mydomain.local 0.00s user 0.00s system 60% cpu 0.012 total
❯❯❯ time bun index.tsx
[
{
priority: 5,
weight: 5,
port: 7000,
name: "localhost",
}
]
bun index.tsx 0.01s user 0.01s system 72% cpu 0.029 total
~/D/t/test-bun ❯❯❯