Template
Update model.js
This commit is contained in:
1 parent
4e901d75ae
commit
c2b5e7bccd
1 file changed
+2
-2
@@ -16,6 +16,6 @@ const instance = new mongoose.Schema(
|
|||||||
|
|
||||||
// document = model name ---> https://mongoosejs.com/docs/guide.html
|
// document = model name ---> 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 document = 'Example';
|
const modelName = 'Example';
|
||||||
|
|
||||||
export default mongoose.model(document, instance);
|
export default mongoose.model(modelName, instance);
|
||||||
Reference in new issue
Block a user