nose-pluto/scripts/generate-hosts.ts
Chris Wanstrath 967bdc6531 ok
2025-09-16 21:20:18 -07:00

9 lines
295 B
TypeScript

import { $ } from "bun"
import { apps } from "../src/webapp"
const { stdout: ip } = await $`hostname -I | awk '{print $1}'`.quiet()
const { stdout: host } = await $`hostname`.quiet()
const hosts = apps().map(app => `${ip} ${app}.${host.toString().trim()}.local`)
console.log(hosts.join("\n"))