/
githubmirror
/
meteor
Обзор
Документация
Войти
/
githubmirror
/
meteor
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
devel
tools/e2e-tests/apps/react/server/main.js
37 строк
1013 B
Nacho Codoñer
rename modern references on tests to e2e, like ./tools/e2e-tests/apps, create-app:e2e and etc
03 мар 2026, 15:06
03 мар 2026, 15:06
008bd95
Код
Авторство
О чём код?
import { Meteor } from 'meteor/meteor'; import { LinksCollection } from '/imports/api/links'; async function insertLink({ title, url }) { await LinksCollection.insertAsync({ title, url, createdAt: new Date() }); } Meteor.startup(async () => { // If the Links collection is empty, add some data. if (await LinksCollection.find().countAsync() === 0) { await insertLink({ title: 'Do the Tutorial', url: 'https://react-tutorial.meteor.com/simple-todos/01-creating-app.html', }); await insertLink({ title: 'Follow the Guide', url: 'https://guide.meteor.com', }); await insertLink({ title: 'Read the Docs', url: 'https://docs.meteor.com', }); await insertLink({ title: 'Discussions', url: 'https://forums.meteor.com', }); } // We publish the entire Links collection to all clients. // In order to be fetched in real-time to the clients Meteor.publish("links", function () { return LinksCollection.find(); }); });