The example in another post is good, but 1 more command is required and 2 teams need to be removed to make it work as you like.
SomeCollection = new Collection("...") fibers = __meteor_bootstrap__.require("fibers"); connect = __meteor_bootstrap__.require('connect') app = __meteor_bootstrap__.app router = connect.middleware.router (route) -> route.get '/', (req, res,next) -> Fiber () -> SomeCollection.insert(...) .run() next() app.use(router)
This should solve your problem.
source share