This commit is contained in:
Chris Wanstrath 2025-09-21 21:40:30 -07:00
parent 890feada1e
commit 33abed3165

View File

@ -1,7 +1,11 @@
import { $ } from "bun"
import { apps } from "@/webapp" import { apps } from "@/webapp"
export default function () { export default async function () {
const domain = "localhost" 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" let port = process.env.PORT || "3000"
port = port === "80" ? "" : `:${port}` port = port === "80" ? "" : `:${port}`