Mongoose - Force Collection Name
December 26, 2020•24 words
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