punch-db-versioning
v0.0.3
Published
Module for record database change to Mongo.
Downloads
3
Readme
punch-db-versioning
Tracks db changes made by user.
Usage
var VersionControl = require('punch-db-versioning');
var V = new VersionControl({dbName:'versioning'});
var resourceBook = V.createResource('book');
resourceBook.logAction({
dataId: '123',
data:{'some':'data'},
userId: '456',
user:{'some':'userinfo'},
action: VersionControl.ACTIONS.CREATE,
}).then(result => {
console.log(result);
}).catch(err => {
console.error(err);
})