diff --git a/nose/bin/apps.tsx b/nose/bin/apps.tsx index 1e5aafa..c7f65d0 100644 --- a/nose/bin/apps.tsx +++ b/nose/bin/apps.tsx @@ -1,7 +1,11 @@ +import { $ } from "bun" import { apps } from "@/webapp" -export default function () { - const domain = "localhost" +export default async function () { + const hostname = await $`hostname`.quiet() + let domain = process.env.BUN_HOT ? "localhost" : hostname.toString() + if (!domain.endsWith(".local")) domain += ".local" + let port = process.env.PORT || "3000" port = port === "80" ? "" : `:${port}`