Node.js and asynchronous programming with Q
问题 Is the following the correct way to go about things? This is a sign up controller action. Im creating a user and a group to add the user to. Notice I have method level variables called user and group. The rest of the code is asynchronous using the Q module. Is it ok to have the method level variables or will they be overriden by the another person signing up at the same time? exports.postSignUp = function(req, res, next) { var user, group; return Q.invoke(exports, 'parseUser', req, null)