meteor 模拟出版物的延迟

示例

在现实世界中,可能会发生连接和服务器延迟,在开发环境中模拟延迟可以使用Meteor._sleepForMs(ms);

Meteor.publish('USER_DATA', function() {
    Meteor._sleepForMs(3000); // 模拟3秒延迟
    return Meteor.users.find({});
});