Search code examples
meteorddp

Bind Meteor's client to separate DDP server


I'd like to bind my frontend APP which is built in Meteor to a standalone server that exposes its API via DDP connection. I have this server's DDP connection URL, but how do i actually connect to it from my frontend APP?

Is there a way in Meteor to set the default DDP connection which frontend APP should use to a custom value (URL)?


Solution

  • You can use

    DDP.connect(url)
    

    Documentation is here: https://docs.meteor.com/api/connections.html

    You will need to manage the connection yourself (ie reconnect when it fails)