node-mongodb-audit
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

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": ""
}

Dependencies (1)

Dev Dependencies (2)

Package Sidebar

Install

npm i node-mongodb-audit

Weekly Downloads

1

Version

0.1.2

License

ISC

Unpacked Size

5.6 kB

Total Files

6

Last publish

Collaborators

  • rania_bys