by
0
3
1,287
0
Top 1% !
Famous
Specified
Popularity: 16058th place
Created
Modified Nov 2, 2014

Published on:

No tags for this snippet yet.
LanguageJavaScript
LicenseMIT_X11
SourceGitHub

Meteor: Simulate high latency publish function

Meteor: Simulate high latency publish function: 
meteor_latency_publish.js
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/212616/Meteor--Simulate-high-latency-publish-fu?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
var Future = Npm.require('fibers/future'); Meteor.publish('todos', function(listId) { var future = new Future; Meteor.setTimeout(function () { future.return(Todos.find({listId: listId})); }, 5000); return future.wait(); });
If you want to be updated about similar snippets, Sign in and follow our Channels