What I want is to make a record of all the movements made in the database, for this I plan to use a table blog which has the following structure:
bitacora = {
_id,
action: String,
userId: String,
create_at:{
type: Date,
default: Date.now
}
}
The idea is that every time I delete, register or modify a record that is recorded in this table. Investigating in several pages I have found some things like mongoose-trigger
but I do not understand very well how to implement it. I am something new in the subject and any contribution would be great, beforehand THANK YOU!