I have a nodejs application executing from folder A a binary X also in folder A (using child process exec). Binary X produce an output file O in folder A, so always from where is called.
I need instead the nodejs app to to execute the binary X in an arbitrational folder and produce an output O in a different folder from where the nodejs application A is being execute.
So basically I need to execute the binary as would be in different folder.
I would like to know if it is possible to do this in nodejs and how to do it? Thanks