November 2017
Beginner to intermediate
398 pages
8h 42m
English
To synchronize data, the client must subscribe to a publication declared on the server. A Meteor publication is a function that returns a Meteor collection query. It can take arguments to filter the data that will be synchronized.
For our app, we will only need a simple measures publication that sends all the documents of the Measures collection:
import { Meteor } from 'meteor/meteor' import { Measures } from '../lib/collections' Meteor.publish('measures', function () { return Measures.find({}) })
Read now
Unlock full access