createCollection()
Creates a new collection where data will be stored
Example
db.createCollection("users").then(() => {
console.log("createCollection:", "ok");
}).catch((error) => {
console.log("error:", error);
});createCollection(name)
Parameter
Description
Last updated