on-server
Version:
Run shell commands in the browser
11 lines (10 loc) • 450 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var child_process_1 = require("child_process");
console.log("Stopping on-server");
var pm2Proc = child_process_1.spawn("pm2", ["stop", "dist/pm2.config.js"], { shell: true });
pm2Proc.stdout.pipe(process.stdout);
pm2Proc.on("exit", function (code) {
console.log(code == 0 ? "on-server stopped successfully" : "on-server failed to stop");
});