meteor アプリのコレクションのソースとして設定したいいくつかのコレクションを含む Rails アプリがあります。
私の理解では、そうすることで流星から接続できます。
var remote = DDP.connect('http://127.0.0.1:5000');
Customers = new Meteor.Collection('customers', remote);
remote.subscribe('customers', function() {
var customers = Customers.find();
console.log(customers.count());
});
それは流星の部分にとってはかなり単純に思えますが、レールモデルを取得して出版物として公開する方法を理解しようとして苦労しています。
ここで ruby-ddp-client を見つけましたhttps://github.com/knubie/ruby-ddp-client また、ここで与えられた例を見ましたhttp://www2.bindle.me/blog/index.php/726/ Augmenting-meteor-plugging-gaps-with-external-servicesですが、上記の例を使用して単純な Rails モデルを公開する方法をまだ理解していません。
どんな助けでも大歓迎です。