Skip to content

Instantly share code, notes, and snippets.

@tgmarinho
Created April 20, 2018 17:44
Show Gist options
  • Save tgmarinho/a66382b86530cda6712db81639831de6 to your computer and use it in GitHub Desktop.
Save tgmarinho/a66382b86530cda6712db81639831de6 to your computer and use it in GitHub Desktop.
how to create a Collection Mongo in the Meteor
import { Mongo } from 'meteor/mongo';
const tasksCollection = new Mongo.Collection('tasks');
Object.assign(tasksCollection, {
add(task) {
this.insert({ ...task }));
});
export { tasksCollection as TasksCollection };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment