Created
April 20, 2018 17:44
-
-
Save tgmarinho/a66382b86530cda6712db81639831de6 to your computer and use it in GitHub Desktop.
how to create a Collection Mongo in the Meteor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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