Spaces:
Runtime error
Runtime error
| const { execSync } = require("child_process"); | |
| const TOKEN = "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"; | |
| if (!TOKEN) { | |
| console.error("β Missing TOKEN in environment variables."); | |
| process.exit(1); | |
| } | |
| try { | |
| console.log("π Cloning repo..."); | |
| execSync(`git clone https://${TOKEN}@github.com/jonellcc/GDPS-CONVERTER-V2.git`, { stdio: "inherit" }); | |
| console.log("π Moving files..."); | |
| execSync(`mv GDPS-CONVERTER-V2/* ./`, { stdio: "inherit" }); | |
| execSync(`mv GDPS-CONVERTER-V2/.* ./ || true`, { stdio: "inherit" }); | |
| console.log("π§Ή Cleaning up..."); | |
| execSync(`rm -rf GDPS-CONVERTER-V2`, { stdio: "inherit" }); | |
| console.log("π¦ Installing dependencies..."); | |
| execSync(`npm install`, { stdio: "inherit" }); | |
| console.log("π Starting app..."); | |
| execSync(`node index.js`, { stdio: "inherit" }); | |
| } catch (err) { | |
| console.error("β Error during bootstrap:", err); | |
| process.exit(1); | |
| } |