nose-pluto/scripts/generate-hosts.ts
Chris Wanstrath b2e0167c82 of course
2025-09-16 21:20:42 -07:00

9 lines
313 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.toString().trim()} ${app}.${host.toString().trim()}.local`)
console.log(hosts.join("\n"))