4 ms·
Having used Meteor for a few weeks, I'm always impressed with how much time it is saving me. One of the unfortunate things about Meteor at the moment is there
by nicklovescode 14y ago
Having used Meteor for a few weeks, I'm always impressed with how much time it is saving me.
One of the unfortunate things about Meteor at the moment is there aren't many open projects to learn from. For others trying to gain insights to best practices through this projects, here are some suggestions I may offer:
Users.find({last_seen: {$lt: (now - 60 * 1000)}}).forEach(function (user) { Users.remove(user._id); });
-> Users.remove({ last_seen: { $lt: (now - 60 * 1000) } });
and
Messages.find({date: {$gt: new Date()}}).forEach(function (message) {
Messages.update(message._id, {$set: {date: new Date()}});
});
-> Messages.update({date: {$gt: new Date()}}, { $set: {+new Date() }})
Excellent work otherwise though. I'd love to see more open source projects released with Meteor if anything for others to learn from!
- zquestz 14y agoThanks for the suggestions, just some quick hacking over the past two nights. I will update those queries. =)
- shinta42 14y agoA quick search through github, i found there are so many open projects out already, you just have to know how to search. for example, https://github.com/Maedi/CometHop https://github.com/Maedi/CometHop https://github.com/jonathanKingston/britto https://github.com/jonathanKingston/britto https://github.com/chris-ramon/minitrello https://github.com/chris-ramon/minitrello https://github.com/maeharin/dokoiru https://github.com/maeharin/dokoiru https://github.com/tomsoderlund/MathPlay https://github.com/tomsoderlund/MathPlay https://github.com/philippkueng/rock-paper-scissors https://github.com/philippkueng/rock-paper-scissors