Proxy package

This commit is contained in:
Mario Zechner 2025-10-05 19:02:15 +02:00
parent aaea0f4600
commit 66f092c0c6
9 changed files with 249 additions and 4 deletions

16
packages/proxy/src/cli.ts Normal file
View file

@ -0,0 +1,16 @@
#!/usr/bin/env node
import { spawn } from "node:child_process";
import path from "node:path";
import { fileURLToPath } from "node:url";
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const port = process.argv[2] || "3001";
// Run the CORS proxy
const child = spawn("node", [path.join(__dirname, "cors-proxy.js"), port], {
stdio: "inherit",
});
child.on("exit", (code) => {
process.exit(code || 0);
});