Skip to content
Advertisement

Tag: spawn

How to use child-process-promise

What I want is to add some processing after command produced output in stdout. So finally I want to create a function to use like this: The function should use promise from child-process-promise, wait until successful result produced and return promise for processing data. Answer Welcome to Stack Overflow @ScHoolboy. I cansuggest you use a basic child-process module from Node.js

Weird output “<Buffer" in child_process.spawn

Trying to write a script to dump my MongoDB to afterwards restore it in a Test database again. Weirdly the script does what it is supposed to (I can find the output BSON under the specified location), but the output is cryptic: Answer That output is just encoded text. Try this to see the real output: Note that this output

Advertisement