Closed lesterzone closed 8 years ago
First: Thanks!
Second: I tried to research about the ability to enabled timestamps 'globally'. Is there a way to enable timestamps to the mongoose object?
like with promises:
let mongoose = require('mongoose'); mongoose.Promise = global.Promise;
You can use mongoose.plugin()
http://mongoosejs.com/docs/api.html#index_Mongoose-plugin
Thanks @kangsu-dev
let mongoose = require('mongoose'); let timestamps = require('mongoose-timestamp'); mongoose.plugin(timestamps);
First: Thanks!
Second: I tried to research about the ability to enabled timestamps 'globally'. Is there a way to enable timestamps to the mongoose object?
like with promises: