devmode
This commit is contained in:
parent
33abed3165
commit
255fb5102a
|
|
@ -1,10 +1,12 @@
|
||||||
import { $ } from "bun"
|
import { $ } from "bun"
|
||||||
import { apps } from "@/webapp"
|
import { apps } from "@/webapp"
|
||||||
|
|
||||||
|
const devMode = process.env.BUN_HOT
|
||||||
|
|
||||||
export default async function () {
|
export default async function () {
|
||||||
const hostname = await $`hostname`.quiet()
|
const hostname = await $`hostname`.quiet()
|
||||||
let domain = process.env.BUN_HOT ? "localhost" : hostname.toString()
|
let domain = devMode ? "localhost" : hostname.toString()
|
||||||
if (!domain.endsWith(".local")) domain += ".local"
|
if (!devMode && !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}`
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user