Update model.js

This commit is contained in:
Ben Elferink
2020-12-31 03:21:39 +02:00
committed by GitHub
parent c2b5e7bccd
commit a205f496c9

View File

@@ -14,7 +14,7 @@ const instance = new mongoose.Schema(
}, },
); );
// document = model name ---> https://mongoosejs.com/docs/guide.html // modelName ---> https://mongoosejs.com/docs/guide.html
// note: use a singular name, mongoose automatically creates a collection like so -> model: 'Person' === collection: 'people' // note: use a singular name, mongoose automatically creates a collection like so -> model: 'Person' === collection: 'people'
const modelName = 'Example'; const modelName = 'Example';