Meteor DDP server, supporting Meteor-style reactive subscriptions and methods. Implemented in a small efficient way.
Create DDP Server
var DDP = port:3000;
Create Subscriptions
Subscriptions are not backed by Mongo documents. You can create fully custom subscriptions. Internally the data structure is a hash object where the keys are the _id
's and the values are the values:
var Files = server;Filesid1 = name:'swiggity-swooty.mp4';Filesid2 = name:'coming-for-that-booty.mp4';
When you set or remove a property of Files
, it will send the appropriate message over DDP.
Methods
Methods are invoked with the arguments supplied by the connected client and a node-style callback. To return a value, invoke the callback.
DDP;
Add DDP to an existing HTTP server
var app = ;appserver = http;var server = httpServer: appserver;