I'm trying to execute a file as child process with separate output, for example, I start my main project from a cmd process with "node .", and when I fill in a certain command in my main CLI, I want another cmd process to pop up with the child service output. Problem is the child output also needs to support input.
File 1 (Main project file): index.js
File 2 (Child Process file): kahoot.js
File 2 (Child process code snippet):
rl.question("Please enter game-pin: ", function(pin) {
rl.question("Please enter bot-name: ", function(name) {
rl.question("Please enter amount of bots: ", function(amount) {
var session = new kahoot.Session(pin /** pin */, /** optional cors proxy, url string */)
addPlayerGroup(name, amount, canBeRemoved, selectOnAdd, session)
rl.close();
});
});
});
Not really anymore code to show, I just want this to work.. Thanks