mirror of
https://github.com/BigBodyCobain/Shadowbroker.git
synced 2026-07-25 13:10:53 +02:00
fix: integrate AI cross-platform start scripts
Former-commit-id: 2054b6036d
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
const { execSync } = require("child_process");
|
||||
const path = require("path");
|
||||
const fs = require("fs");
|
||||
|
||||
const backendDir = path.resolve(__dirname, "backend");
|
||||
const venvBin = process.platform === "win32"
|
||||
? path.join(backendDir, "venv", "Scripts", "python.exe")
|
||||
: path.join(backendDir, "venv", "bin", "python3");
|
||||
|
||||
if (!fs.existsSync(venvBin)) {
|
||||
console.error(`[!] Python venv not found at: ${venvBin}`);
|
||||
console.error("[!] Run start.sh (Mac/Linux) or start.bat (Windows) first to create the venv.");
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
console.log(`[*] Starting backend with: ${venvBin}`);
|
||||
execSync(`"${venvBin}" -m uvicorn main:app --reload`, {
|
||||
cwd: backendDir,
|
||||
stdio: "inherit",
|
||||
});
|
||||
Reference in New Issue
Block a user