// Static dev server. The header policy (COOP/COEP, CORP, CSP, Service-Worker-Allowed) is // src/node/server.ts's, the same the package ships; this file only decides which repo // paths get what. demo/no-coi.html is served WITHOUT COOP/COEP: it exists to prove // boot() refuses. import { createServer } from "node:http"; import { readFile } from "node:fs/promises"; import { extname, join, normalize, resolve } from "node:path"; import { fileURLToPath } from "node:url"; import { contentSecurityPolicy, headersFor } from "../src/node/server.ts"; const ROOT = resolve(fileURLToPath(new URL("..", import.meta.url))); const PORT = Number(process.env.PORT ?? 8931); const MIME = { ".html": "text/html; charset=utf-8", ".js": "text/javascript; charset=utf-8", ".mjs": "text/javascript; charset=utf-8", ".cjs": "text/javascript; charset=utf-8", ".css": "text/css; charset=utf-8", ".txt": "text/plain; charset=utf-8", ".json": "application/json", ".wasm": "application/wasm", }; // Demo pages keep an inline