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])