mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 06:04:40 +00:00
16 lines
424 B
JavaScript
16 lines
424 B
JavaScript
#!/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);
|
|
});
|