Created
April 20, 2018 17:43
-
-
Save tgmarinho/b86783db64e708264e6dd6a1cbe0c924 to your computer and use it in GitHub Desktop.
Add new todos from main.js 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
// Add new todos | |
import { Meteor } from 'meteor/meteor'; | |
import { TasksCollection } from 'my/path/to/collections/TasksCollection'; | |
Meteor.startup(function() { | |
const data = JSON.parse(Assets.getText('csvjson.json')); // esta na pasta private do Meteor | |
console.log(data.length); | |
data.forEach(item => { | |
TasksCollection.add(item); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment