Skip to content

Instantly share code, notes, and snippets.

@jazst21
Created April 6, 2019 05:53
Show Gist options
  • Select an option

  • Save jazst21/67bb51e96e8d6fc40a8b80d589481b43 to your computer and use it in GitHub Desktop.

Select an option

Save jazst21/67bb51e96e8d6fc40a8b80d589481b43 to your computer and use it in GitHub Desktop.
import { Meteor } from 'meteor/meteor';
import PlayersData from '../imports/api/PlayersData';
import { Players } from '../imports/ui/Config.js';
Meteor.startup(() => {
Players.map(player => {
PlayersData.insert({
name: player.name,
score: player.score
})
})
console.log(Players);
console.log(PlayersData.find().fetch())
console.log(Players[1].score);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment