How to insert auto increment number in mongoose
问题 Tried to insert auto increment number for serial number in mongodb using mongoose and nodejs but not working.Where i want to update my code to find solution.If anyone knows please help to find solution. subs.model.js: const mongoose = require('mongoose'); var subscriberSchema = new mongoose.Schema({ _id: {type: String, required: true}, email: { type: String } }, { versionKey: false, collection: 'subscribers' }); module.exports = mongoose.model('Subscribers', subscriberSchema); data.controller