Command and Query handling for node.js