First, Please understand that it's not smooth because I use a translator.
I want to create an API server using the child_process module in node.js to send git command. ex) git clone ..., git pull, git push , ...
And i succeeded!
But there's a big problem here. ;(
execSync(cmd, {stdio: 'inherit', cwd: cwd});
This is my code.
'npm start' And use this API.
Logs are displayed in the cmd window.
It is displayed in the log like this, but I can't allocate it as a variable in my node code. Like stdout, stderr.
If you don't use '{stdio: 'inherit'}' this option, you're successfully assigned to the variable.
But I want to show the log of the server and assign it to the variables.
How can we catch two rabbits?