1.mongodb新增加字段会不成功,解决方法:
var schema_comment = new mongoose.Schema({
cid: String,
content: String,
createTime: {type: Date, default: Date.now()}
},{
strict: false //enable to add new fields dynamic
});
参考:https://github.com/LearnBoost/mongoose/issues/1867