Communicate with Electron App


#1

Hi,

In my current project I have the need to create a communication between an Electron app and an external process. There is another process running on my raspberry Pi, and want something happens in this process, I need to notify the electron app, which is also running. How would I need to do this? Can I create an event handler to listen for external events?

I’m a noob in electron, so if someone has some pointers, please don’t hesitate to suggest.

thanks


#2

Since electron has access to standard Node.js features, you could build a simple Web API and use an HTTP/REST type approach.


#3

That’s a great idea. I had been pondering on that one. I’ll give it a shot. Thanks!


#4

YW. Let me know how it works out.


#5

I used node.js zeromq module to talk to external c# program