Mongoose - Force Collection Name

test

const dataSchema = new Schema({..}, { collection: 'data' });

or

const Document = mongoose.model("Document", documentSchema, "<collection>");

Refs:
https://mongoosejs.com/docs/guide.html#collection

https://stackoverflow.com/questions/7486528/mongoose-force-collection-name


You'll only receive email when Teo Oliver publishes a new post

More fromĀ Teo Oliver