I’m trying to use Meteor’s pubsub pattern but my publication is returning false on ready(). This seems to be a bit of an anomaly, there aren’t many issues of this kind on the internet - which probably means I’m missing something basic, anyway here we go:
// in /app/server/collections/clubs.js
import ClubSchema from '../schemas/clubs.js';
export const Clubs = ( function() { // <- tried refactoring to
var clubs = new Mongo.Collection('clubs'); // standard collection declaration
clubs.attachSchema(ClubSchema);
return clubs;
} )();
// in /app/server/publications/clubs.js
import { Clubs } from '/app/server/collections/clubs.js';
Meteor.publish('clubs', function () {
console.log("hello, world!");
return Clubs.find();
});
// in /app/client/templates/new-club.js
Template.App_clubs.onCreated(function () {
Meteor.subscribe('clubs');
});