I'm new to Node.
I need to query Mysql and return that data to client synchronously.
If I do so does it mean that I block Reactor even if I use evented Mysql lib?
How should I do it correctly?
I think that fake example will answer your question :
var http = require('http');
var db = require('db');
http.createServer(function (req, res) {
db.query('fake query', function(data){
res.send(data);
}
}).listen(1337, '127.0.0.1');
Even if you don't send your response syncronously, it's ok, that is how node work. I struggled with that concept at first, too.