Simple Mongoose AutoIncrement Implementation , No Plugin Required.
Simply ,
- Add counter.model.js in your models folder
- Call "getSetAutoIncrementId" Pre Hook "save" or "findoneandupdate" in your Model.
Refer Example Folder for Quries.
Additionally You can Specify which field you want to refer for AutoIncrement.