mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 08:02:17 +00:00
Proxy package
This commit is contained in:
parent
aaea0f4600
commit
66f092c0c6
9 changed files with 249 additions and 4 deletions
16
packages/proxy/src/cli.ts
Normal file
16
packages/proxy/src/cli.ts
Normal 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);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue