Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ddp-micro

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ddp-micro

Meteor's DDP server, supporting Meteor-style reactive subscriptions and methods.

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Meteor DDP server, supporting Meteor-style reactive subscriptions and methods. Implemented in a small efficient way.

Create DDP Server

var DDP = new DDPServer({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.publish('Files');
Files.id1 = {name:'swiggity-swooty.mp4'};
Files.id2 = {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.methods({
    test(value, callback) {
        callback(null, value)
    }
});

Add DDP to an existing HTTP server

var app = express();
app.server = http.createServer(app);
var server = new DDPServer({httpServer: app.server});

Keywords

FAQs

Package last updated on 29 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc