Skip to content
This repository was archived by the owner on Jun 25, 2022. It is now read-only.

Commit c669958

Browse files
author
xamfoo
committed
Merge branch 'develop'
2 parents f882ad1 + 3262376 commit c669958

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,26 @@ which are created when subscriptions requires them.
144144

145145
Example:
146146

147+
```javascript
148+
// On the target server
149+
Fruits = new Mongo.Collection('fruits');
150+
151+
Meteor.publish('fruits', function () {
152+
return Fruits.find();
153+
});
154+
```
155+
156+
```javascript
157+
// On the proxy server
158+
var ddpProxy = new DDPProxy;
159+
var connection = ddpProxy.connect();
160+
161+
connection.subscribe('fruits', function () { // Subscribe
162+
// Results are returned in connection.collections
163+
console.log(connection.collections.fruits.find().fetch());
164+
});
165+
```
166+
147167
### `connection.loginStatus`
148168

149169
Example loginStatus object:

0 commit comments

Comments
 (0)