3

I’ve a binary which is executable (a golang cli) which I need to call from nodejs application and get the response. for example when running the following

fzr get apps it will provide list of apps in json format

I’ve two main question

  1. Where should I put this binary ? let say I need to add it to my repository/lib ( I don't want to assume that this binary is available in the environment like my pc or docker image, i want it be bundle inside my node module )
  2. How should I call it ? I read about child process https://nodejs.org/api/child_process.html#child_process_child_process

is it the recommended way? or there is other lib which could help…

Jenny M
  • 923
  • 1
  • 14
  • 37

0 Answers0