duanguan1573 2019-04-11 10:52
浏览 144

从nodejs应用程序使用二进制(golang)并使用输出

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…

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 shape_predictor_68_face_landmarks.dat
    • ¥15 slam rangenet++配置
    • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
    • ¥15 对于相关问题的求解与代码
    • ¥15 ubuntu子系统密码忘记
    • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
    • ¥15 保护模式-系统加载-段寄存器
    • ¥15 电脑桌面设定一个区域禁止鼠标操作
    • ¥15 求NPF226060磁芯的详细资料
    • ¥15 使用R语言marginaleffects包进行边际效应图绘制