diff --git a/src/mq.ts b/src/mq.ts index 86c2904..0b3501e 100644 --- a/src/mq.ts +++ b/src/mq.ts @@ -1,9 +1,16 @@ +import os from 'os'; + import zmq from "zeromq"; import { spawn } from "child_process"; const sock = zmq.socket("req"); -sock.connect("ipc:///tmp/humanify-local-inference-server.ipc"); +// Allow communication support for windows +if (os.platform() === 'win32') { + sock.connect("inproc:///tmp/humanify-local-inference-server.ipc"); +} else { + sock.connect("ipc:///tmp/humanify-local-inference-server.ipc"); +} export function send(message: Object) { sock.send(JSON.stringify(message));