Skip to content

BudgieInWA/meteor-remote-ddp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Meteor Remote DDP

When building an app with decoupled client-code and server-code (say a mobile version of an existing app), your client connects via DDP to its own server by default.

This package allows you to specify a remote DDP server for Accounts, subscriptions and Meteor methods.

This package is quite brittle. It relies heavily on private APIs and monkey patching and has been tested by the author on Meteor 1.1. Bug reports welcome.

Usage

  1. meteor add budgie:remote-ddp

    If you use accounts-base, or any dependant package, you must edit .meteor/packages to move budgie:remote-ddp above any such packages.

  2. Add the remote to your settings JSON file:

    {
      "public": {
    	"remoteDdpUrl": "http://localhost:5000"
      }
    }
  3. In your client code, before doing anything that uses DDP, initialise RemoteDDP:

    RemoteDDP.monkeyPatch();

    Note that the Accounts package uses DDP as it is initialised, but this package works around that as a special case (see step 1.).

  4. Launch Meteor using your settings file:

    meteor --settings settings.json

Contributing

Please send Issues and Pull Requests to https://github.com/BudgieInWA/meteor-remote-ddp.

Notes

  • Based on gwendall:remote-ddp.
  • The author is not convinced that the Mongo.Collection support is bulletproof.
  • Does not work in Cordova. To access a different server, use the --mobile-server flag instead.

About

Get your Meteor client point to any DDP server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%