node-mongodb-audit
v0.1.2
Published
Track changes on mongo databases
Downloads
4
Maintainers
Readme
Note
this package only works for replica set and sharded cluster
Database Audit Package
This package provides functionality for auditing database changes in MongoDB.
Installation
To install the package, run the following command:
npm install node-mongodb-audit
Upon installation, a configuration file will be generated in your project directory. This file includes essential information for database connections and an exceptions array. Before utilizing the audit function, ensure that these configurations are properly defined.
Usage
Importing the Package:
import { initConnection } from 'node-mongodb-audit';
Setting up Database Connection
initConnection();
Configuration
You can configure the exceptions for auditing by editing the exceptions.json file.
Example exceptions.json
{
"exceptions": ["auditlog"],
"DBString": ""
}