Skip to content

Instantly share code, notes, and snippets.

@estark37
Created July 6, 2013 15:13
Show Gist options
  • Save estark37/5940184 to your computer and use it in GitHub Desktop.
Save estark37/5940184 to your computer and use it in GitHub Desktop.
if (Meteor.isClient) {
Test = new Meteor.Collection("test");
Meteor.subscribe("testsub");
}
if (Meteor.isServer) {
Test = new Meteor.Collection("test", { connection: null });
Meteor.publish("testsub", function () {
return Test.find();
});
Test.insert({ foo: "bar" });
Test.insert({ foo: "baz" });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment