Nevar pievienot vairāk kā 25 tēmas
Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
33 rindas
751 B
33 rindas
751 B
pirms 4 gadiem
|
import { Meteor } from 'meteor/meteor';
|
||
|
import Links from './collections/Links.js';
|
||
|
|
||
|
Meteor.startup(() => {
|
||
|
// if the Links collection is empty
|
||
|
if (Links.find().count() === 0) {
|
||
|
const data = [
|
||
|
{
|
||
|
title: 'Do the Tutorial',
|
||
|
url: 'https://www.meteor.com/try',
|
||
|
createdAt: new Date(),
|
||
|
},
|
||
|
{
|
||
|
title: 'Follow the Guide',
|
||
|
url: 'http://guide.meteor.com',
|
||
|
createdAt: new Date(),
|
||
|
},
|
||
|
{
|
||
|
title: 'Read the Docs',
|
||
|
url: 'https://docs.meteor.com',
|
||
|
createdAt: new Date(),
|
||
|
},
|
||
|
{
|
||
|
title: 'Discussions',
|
||
|
url: 'https://forums.meteor.com',
|
||
|
createdAt: new Date(),
|
||
|
},
|
||
|
];
|
||
|
|
||
|
data.forEach(link => Links.insert(link));
|
||
|
}
|
||
|
});
|