.post(,(req,res){ = req.., = req.., = req.[], = req..; .(); (!=){ .(); req.(,); res.()} = .(), = .(req..).(); = ({ :, :, :}); .(.,(err,user){ .(); (err){ .(); req.(,err); res.(); } (user){ .(); req.(,); res.();} .((err,user){ .(); (err){ req.(,err); res.();} req..= ;.(req..); req.(,); .(); res.();}); }); });
.= (username,callback){ .(); .(username); .((err,db){ .(); (err){ .(); callback(err);} db.(,(err,collection){ .(); (err){ .(); .(); callback(err);} .(); collection.fineOne({: username,},(err,user){ .(); .(); (err){ callback(err);} .(); callback(,user);}); }); }); };
semir_
相关分类