Observe in a Publish Function

Learn how Meteor publishes data from a cursor.

Good job! That's it for "Observe in a Publish Function."

Need a second look? Watch again

Observe in a Publish Function

How does observe work inside a publish function? How does Meteor publish a cursor using the observer framework under the hood? In this screencast we'll use node-inspector and our custom ddp client to see what's actually happening when we publish a cursor or create custom observers on a cursor inside a publish function.

  • Meteor
  • Tutorial
**Related lessons:** * <a href="http://www.eventedmind.com/posts/meteor-subscriptions-and-ddp" target="_blank">Subscriptions and DDP</a> * <a href="http://www.eventedmind.com/posts/meteor-observing-cursors" target="_blank">Observing Cursors</a> * <a href="http://www.eventedmind.com/posts/meteor-how-do-client-cursors-work" target="_blank">How do Client Cursors Work</a> **Installing Node Inspector** <ol> 1. Install Node Inspector ``` > npm install -g node-inspector ``` 2. Start your Meteor project with Node debugging enabled ``` > NODE_OPTIONS='--debug' mrt ``` 3. Start the node inspector in another terminal window ``` > node-inspector ``` 4. Open Chrome and navigate to: http://localhost:8080/debug?port=5858 <br><br> 5. Debug just like you would in the browser! </ol> <br> **DDP Client Instructions** Watch the [Subscriptions and DDP lesson](https://www.eventedmind.com/feed/meteor-subscriptions-and-ddp) for instructions on how to set up a simple DDP client.
Join the Discussion

Want to leave a comment? .