Skip to content

Instantly share code, notes, and snippets.

@lvbreda
Created July 31, 2012 23:21
Show Gist options
  • Save lvbreda/3221676 to your computer and use it in GitHub Desktop.
Save lvbreda/3221676 to your computer and use it in GitHub Desktop.
Server routing
__meteor_bootstrap__.app
.use(connect.query())
.use(function (req, res, next) {
// Need to create a Fiber since we're using synchronous http calls
Fiber(function() {
if({{yourcheck}}){
res.writeHead(200, {'Content-Type': 'text/html'});
res.write("blabla");
res.end();
}else{
next();
return;
}
}).run();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment