ccprojects's picture
Update index.js
49ed22a verified
raw
history blame contribute delete
913 Bytes
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);
}