Files
time/quc/dev.mjs
T
time 7a805ce5ae
ci / test (push) Successful in 45s
sync / sync (push) Successful in 8s
time/worker-run grep -rniE "quc" --include=*.md --include=*.json . -l | head; grep -rniE "tone|voice" README.md .cla
Scaffold quc app shell, health check and Cloudflare deploy (#237)
Co-authored-by: Time <time@users.noreply.teahub.xyz>
2026-10-22 08:40:28 +00:00

10 lines
445 B
JavaScript

// Run the Worker locally: `npm start` in quc/, then http://localhost:8787/
import { createServer } from "node:http";
import worker from "./src/worker.js";
createServer(async (q, s) => {
const r = await worker.fetch(new Request(`http://${q.headers.host}${q.url}`, { method: q.method }), { REV: "dev" });
s.writeHead(r.status, Object.fromEntries(r.headers));
s.end(Buffer.from(await r.arrayBuffer()));
}).listen(process.env.PORT || 8787);