resume/build.ts
2024-12-03 17:10:40 +01:00

23 lines
497 B
TypeScript

import { startServer } from "./server.ts";
async function main() {
const server = startServer("localhost", 6969);
const chromiumCmd = new Deno.Command("chromium", {
args: [
"--headless",
"--print-to-pdf=./cv.pdf",
"--no-pdf-header-footer",
"http://localhost:6969/cv.html"
]
})
const process = chromiumCmd.spawn()
await process.status
await server.shutdown()
}
if (import.meta.main) {
await main();
}