export function applicationUrl(path: string, baseUrl = process.env.APP_URL) { if (!baseUrl) throw new Error("APP_URL is required to build public application URLs"); return new URL(path, baseUrl); }