Skip to content

Instantly share code, notes, and snippets.

@dburles
Created November 30, 2015 04:09
Show Gist options
  • Save dburles/bf9db45b186e89a00cf0 to your computer and use it in GitHub Desktop.
Save dburles/bf9db45b186e89a00cf0 to your computer and use it in GitHub Desktop.
if (Meteor.isClient) {
StaticPosts = new Mongo.Collection(null);
fetchAndInsert('test', StaticPosts, (error, response) => {
// ...
});
}
if (Meteor.isServer) {
Meteor.methods({
test: () => {
return [
{
_id: Random.id(),
title: 'test 1'
},
{
_id: Random.id(),
title: 'test 2'
},
{
_id: Random.id(),
title: 'test 3'
},
];
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment