Created
May 6, 2022 21:31
-
-
Save juanpicado/7804a75841d729dd21239364f1de7509 to your computer and use it in GitHub Desktop.
verdaccio simple spawn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { spawn } from "child_process"; | |
const child = spawn("node", [ | |
require.resolve("verdaccio/bin/verdaccio"), | |
"-c", | |
"./verdaccio.yaml", | |
]); | |
child.stdout.on("data", (data) => { | |
process.stdout.write(data.toString()); | |
}); | |
child.on("exit", () => { | |
console.log("exit"); | |
}); | |
setTimeout(() => { | |
child.kill(); | |
}, 2000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment