How do I wrap a function in a fiber context? Help me please(
i want this:
setInterval Meteor.bindEnvironment ->
user = Meteor.users.findOne().fetch()
console.log(user)
, 1000
how i can do it? i get Error: onException argument must be a function, string or undefined for Meteor.bindEnvironment()
p.s. i not want use Meteor.setInterval, I use setInterval as an example only to understand how I can wrap any function in a fiber context.
in a real application I want like this:
app = express()
express.get '/', Meteor.wrapFunction ->
user = Meteor.users.fondOne().fetch()
console.log(user)