Created
July 31, 2012 23:21
-
-
Save lvbreda/3221676 to your computer and use it in GitHub Desktop.
Server routing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__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