Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
猫鼬和节点的新手。
我不知道 mongoose document.save 方法是否是异步的。我假设它是,因为即使没有连接它也可以工作。有没有办法判断文档何时实际保存(回调)?
yep, it's async. You can use the 'error' parameter to see if there was an error during saving.
http://mongoosejs.com/docs/api.html#model_Model-save