on-server
Version:
Run shell commands in the browser
13 lines (12 loc) • 470 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var child_process_1 = require("child_process");
console.log("Starting on-server with PM2");
var pm2Proc = child_process_1.spawn("pm2", ["start", "config/pm2.config.js"], {
shell: true,
});
pm2Proc.stdout.pipe(process.stdout);
pm2Proc.on("exit", function (code) {
console.log(code == 0 ? "on-server started successfully" : "on-server failed to start");
});