Skip to content

Instantly share code, notes, and snippets.

@J-Cake
Last active September 20, 2019 08:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save J-Cake/5bf7f023e0ddd4173cb1b1854f2d2e2c to your computer and use it in GitHub Desktop.
Save J-Cake/5bf7f023e0ddd4173cb1b1854f2d2e2c to your computer and use it in GitHub Desktop.
const {exec} = require('child_process');
function spawn(...args) {
return new Promise(function (resolve, reject) {
const process = exec(`java -jar gp.jar --delete D27600008501 --key ${lockKey}`, function (err, stdout, stderr) {
if (err)
return reject(err);
});
process.on('exit', code => resolve(code));
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment