Set limits on mongo db collection
问题 So, there are two limits I want to set in mondo db: 1. Only allow one document to be inserted into the dbs, and no more. This document cannot be deleted once added, BUT it can be modified. Also, no other documents can be added to that collection. Only one value will be allowed under this schema. { "_id" : ObjectId("5800"), "seconds" : "120", "__v" : 0 } No more new seconds will be allowed to be added in, and only the above document can be modified. I have tried: var numbersSchema = new