From 88640d7acf0bab0411372c1e1f0bd1db9aa4c03a Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Sun, 28 Sep 2025 14:18:00 -0700 Subject: [PATCH] no dns in dev mode --- app/src/dns.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/dns.ts b/app/src/dns.ts index ba3e2aa..5e24683 100644 --- a/app/src/dns.ts +++ b/app/src/dns.ts @@ -16,6 +16,7 @@ const host = hostRaw.toString().trim() let dnsInit = false export async function initDNS() { + if (process.env.NODE_ENV !== "production") return dnsInit = true apps().forEach(publishAppDNS) @@ -31,8 +32,8 @@ export async function initDNS() { } export function publishAppDNS(app: string) { - if (!dnsInit) throw "publishAppDNS() must be called after initDNS()" if (process.env.NODE_ENV !== "production") return + if (!dnsInit) throw "publishAppDNS() must be called after initDNS()" if (!dnsEntries[app]) dnsEntries[app] = Bun.spawn(["avahi-publish", "-a", `${app}.${host}.local`, "-R", ip])