Files
HexaHost-GameCloud/apps/web/scripts/build-static.mjs
smueller 4104daaf75
Some checks failed
CI / Node — lint, typecheck, test, build (push) Failing after 9s
CI / Go — node-agent tests (push) Failing after 55s
CI / Go — edge-gateway build (push) Successful in 13s
initial commit2
2026-06-26 10:45:58 +02:00

24 lines
564 B
JavaScript

import fs from "node:fs";
import path from "node:path";
const publicDir = path.join(process.cwd(), "public");
const appName = process.env.APP_NAME ?? "HexaHost GameCloud";
fs.mkdirSync(publicDir, { recursive: true });
fs.writeFileSync(
path.join(publicDir, "index.html"),
`<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8" />
<title>${appName}</title>
</head>
<body>
<h1>${appName}</h1>
<p>Phase 0 web build artifact.</p>
</body>
</html>`,
);
console.log(JSON.stringify({ level: "info", msg: "static assets written", dir: publicDir }));