ts-child-process
v0.0.6
Published
Asynchronously execute child-processes on the local or a remote machine.
Downloads
5
Readme
ts-child-process
Asynchronously execute child-processes on the local or a remote machine.
Local
const process: Process = await executor().then(exec => exec.execute("npm", ["--version"], {
shell: true,
});
Remote
const process: Process = await executor({
host: "example.com",
username: "root",
password: "*****",
}).then(exec => exec.execute("npm", ["--version"]);
Usage
process.on("out", (txt) => console.log("OUT", txt))
.on("err", (txt) => console.log("ERR", txt))
.on("close", (code, sig) => console.log("CLOSE", code, sig)));