NODE_ENV
This commit is contained in:
parent
0b6ff7f854
commit
61d917ba7f
|
|
@ -1,7 +1,7 @@
|
||||||
import { $ } from "bun"
|
import { $ } from "bun"
|
||||||
import { apps } from "app/src/webapp"
|
import { apps } from "app/src/webapp"
|
||||||
|
|
||||||
const devMode = process.env.BUN_HOT
|
const devMode = process.env.NODE_ENV !== "production"
|
||||||
|
|
||||||
export default async function () {
|
export default async function () {
|
||||||
const { stdout: hostname } = await $`hostname`.quiet()
|
const { stdout: hostname } = await $`hostname`.quiet()
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "bun src/server.tsx",
|
"start": "bun src/server.tsx",
|
||||||
|
"prod": "env NODE_ENV=production bun src/server.tsx",
|
||||||
"dev": "env BUN_HOT=1 bun --hot src/server.tsx",
|
"dev": "env BUN_HOT=1 bun --hot src/server.tsx",
|
||||||
"deploy": "./scripts/deploy.sh",
|
"deploy": "./scripts/deploy.sh",
|
||||||
"push": "./scripts/deploy.sh",
|
"push": "./scripts/deploy.sh",
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,7 @@ export async function publishDNS() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function publishAppDNS(app: string) {
|
function publishAppDNS(app: string) {
|
||||||
if (process.env.BUN_HOT) return
|
if (process.env.NODE_ENV !== "production") return
|
||||||
|
|
||||||
if (!dnsEntries[app])
|
if (!dnsEntries[app])
|
||||||
dnsEntries[app] = Bun.spawn(["avahi-publish", "-a", `${app}.${host}.local`, "-R", ip])
|
dnsEntries[app] = Bun.spawn(["avahi-publish", "-a", `${app}.${host}.local`, "-R", ip])
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user