rescript-nodejs
rescript-nodejs copied to clipboard
How to use childprocess.send and process.on("message")?
How to use childprocess.send and process.on("message")?
main
const child = fork('xxx')
child.send("hi")
child
process.on("message', () => {})
fork has a binding:
https://github.com/TheSpyder/rescript-nodejs/blob/2f937007a548576afb95226595f7d6e67363aada/src/ChildProcess.res#L129-L130
But I can't find one for send. Likewise there are a few on bindings, but nothing for on("message").
https://github.com/TheSpyder/rescript-nodejs/blob/2f937007a548576afb95226595f7d6e67363aada/src/ChildProcess.res#L9-L18
So both need to be added.