我正在尝试使用 nodejs 异步模型进行异步调用。这是一种情况
Coffeee 中的粗略代码
app.get '/register/email',(req,res)->
re = new require '/model/registerEmail'
re.register
## will the next line of code will be executed immediately if so what should be done
## to send the response..should I wait
class RegisterEmail
checkEmail: (cb)->
mongocall
saveMail: (cb) ->
mongocall
register: ->
async.waterfall([checkmail,savemail],(err,res)->
## how to send the error or response back to server
## since there is no response object access here
exports = RegisterEmail