node.jsexpresselectronpeerlocal-network

How to share data over local network with electron / express application?


I have an electron application that runs with express. I would like to be able to share data between users when they are both 'online' in the local network. I have looked into different peer to peer tools such as peerjs and simple-peer but I have had difficulties with tools and I'm not certain this is the proper route to go in the first place.

What I mean by sharing is that when both users are 'online', they are able to 'sync' their data with each other. Each user has a local database nedb where they store information.

How can I enable users to share data through an express/electron application over a local network?


Solution

  • It appears that I can achieve what I'm looking for using bonjour and socket.io. I will use bonjour to publish http services and to browse these services. I will use socket.io and socket.io-client to emit and listen for events from local clients and external servers.