diff options
Diffstat (limited to 'plugins/Meteor/meteorupdater.js')
-rw-r--r-- | plugins/Meteor/meteorupdater.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/plugins/Meteor/meteorupdater.js b/plugins/Meteor/meteorupdater.js new file mode 100644 index 000000000..2e688336f --- /dev/null +++ b/plugins/Meteor/meteorupdater.js @@ -0,0 +1,21 @@ +// update the local timeline from a Meteor server +// + +var MeteorUpdater = function() +{ + return { + + init: function(server, port, timeline) + { + Meteor.callbacks["process"] = function(data) { + RealtimeUpdate.receive(JSON.parse(data)); + }; + + Meteor.host = server; + Meteor.port = port; + Meteor.joinChannel(timeline, 0); + Meteor.connect(); + } + } +}(); + |