arboleya / electrify

Package your Meteor apps with Electron, and butter
MIT License
247 stars 52 forks source link

can i write electron API result to mongodb also visible to meteor app #47

Closed akolnati closed 8 years ago

akolnati commented 8 years ago

Hi,

Electrify has been amazing so far.. Thanks. I have the below query/

As part of my a requirement, i use a Electron API to get a set of data that i need to re-actively display in the contained meteor app? Can this be done by inserting the data to some shared mongodb so that the meteor app can read from the collection.

if so an example would be helpful.

Thanks

akolnati commented 8 years ago

I have worked out a way to achieve this

I was able to establish a DDP connection to call meteor server methods (which in turn can perform CRUD on mongodb) and have used port 11237 while initializing a DDP client. With this in place now we have bi-directional way that electron and Meteor can communicate with each other i.e to use DDP when Electron communicates with Meteor and use electrify methods when Meteor communicates with Electron API)