Run the meteor server on an external node express/socket server

Hi everyone,

First I would like to say I’m a hudge fan of Meteor projet ! I’m using it everywhere, it’s awesome.
But I have a big project on Meteor and I have to update it on a full API (REST/Socket) using node (with no html results).

The real question: What’s the best way to build an API with Express and Socket.io who can act as Meteor.server for a Meteor project on a different server AND domain name ?

Do something already exist that I did not found ?

The concept

  • The user concact interface-server.com (with meteor) and receive the bundle
  • Meteor.call() and Meteor.subscribe() are redirected on client to api-server.com as with http/socket classics requests to the node API
    • In the best world, the meteor.server on interface-server.com should not be involved here (who are used only to download the client bundle), only the user and the node server are talking
  • Node server know he’s talking with a Meteor app and reply like a Meteor server with publications.

I was thinking about create 2 npm module, one for the node server and another one to the client to help implementation on future projects.

I’m open for every idea, existing projects…

Thank you all

Yoy might want to try this ddp server package from Q42:

Humm… Look very nice ! I didn’t know Meteor create a DDP protocol, it’s very nice.

Just as informations, does meteor core use this package ? Or it’s hardcoded ? (to ref the same package and get the best compatibility in the future)

I also saw this project: https://github.com/Streemo/react-ddp

So if I implement on my API the Rest/Socket/DDP servers I can also create a client-side lib who can connect to the 3 ?
Look awesome