Open GeoffreyBooth opened 9 years ago
Great job, can you create one example how to use de project? thank you!
@GeoffreyBooth and @wzalazar
The minimongo functionality can be located in https://github.com/eface2face/meteor-observe-sequence/blob/master/observe_sequence.js#L11
You could connect to a rest/json endpoint and then write the data into the LocalCollection that you instantiate in your own client code. This should allow you to read and write client side data.
If you don't need the ability to query the data in a mongoish way on client you could probably just create a ReactiveVar with an object and inject it into template. Anytime you update it in javascript it would force any templates that you used it in to recompile and re-render.
If you are trying to use a meteor collection server-side to populate and sync the LocalCollection then you might have trouble. This project from my understanding currently does not include any of the pub/sub DDP client code.
Some of that logic might be in the meteor source around here: https://github.com/meteor/meteor/blob/devel/packages/ddp-client/livedata_connection.js#L1357 The documentation says that particular method is faking it, but basically DDP over websockets seems to be responsible for this.
Hopefully that helps a little, I think an example would be good. If that's something your still interested in seeing without the DDP portion then let me know and I will try to work on an example.
I'd also like to know how to use browserify to include this library clientside.
Just read the browserify doc.
No worries. I figured it out. Pretty easy. @ibc any idea how to compile blaze templates client-side using meteor-client?
@emmanuelbuah Use this https://github.com/eface2face/spacebars-compiler see spacebars / blaze for more info.
Would you mind please posting an example project that shows how to use this with browserify? How would I connect a server-side database, accessed via Ajax say, with a Meteor collection or minimongo?