I’d like to pass input from node into a commandline-based program I wrote. Starting the program is easy enough with child_process.exec, but how can I pass more input after the program has been started?
I’d like to pass input from node into a commandline-based program I wrote. Starting
Share
child_processes.execreturns a “ChildProcess object”, which has a property calledstdin, which is a writable stream to that process’sstdin. Check out the docs for more info.