15 lines
367 B
JavaScript
15 lines
367 B
JavaScript
import { Meteor } from 'meteor/meteor';
|
|
|
|
var PlantTypesCollection = new Meteor.Collection('plantTypes');
|
|
|
|
Meteor.startup(() => {
|
|
if(Meteor.isServer) {
|
|
Meteor.publish('plantTypesCollection', function() {
|
|
return PlantTypesCollection.find();
|
|
})
|
|
}
|
|
|
|
if (Meteor.isClient) {
|
|
Meteor.subscribe('plantTypesCollection');
|
|
}
|
|
}); |