Book Image

Getting Started with Meteor.js JavaScript Framework

By : Isaac Strack
Book Image

Getting Started with Meteor.js JavaScript Framework

By: Isaac Strack

Overview of this book

Table of Contents (14 chapters)

Configuring publishers


Up to this point, we have been using a Meteor package named autopublish. This means that we haven't had to code specific publish events for changes to be broadcast from the server to the client. This is great for testing, but we want to have a bit more control over what events and documents get published so that we that can improve both performance and security.

If we have a large dataset, we may not want to return the entire collection every time. If autopublish is being used, the entire collection will return, and this can slow things down or expose data that we don't want to expose.

Turning off autopublish

The time has come to turn off autopublish. Temporarily stop your Meteor application (if it's still running) by opening the terminal window from which you ran the meteor command. You can stop it by pressing Ctrl + C. Once it's stopped, enter the following command:

> meteor remove autopublish

This removes the autopublish package, which is responsible for all the...