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

0.2.2 • Public • Published

Database Audit Package

This package provides functionality for auditing database changes in mongoose.

Installation

To install the package, run the following command:

npm install node-mongoose-audit

Setting up Database Connection

import { initConnection } from 'node-mongoose-audit'; 

Provide Database Uri

initConnection(uri);

Usage

To add after defining your schema: example:

import mongoose from 'mongoose';
import diffHistory from 'node-mongoose-audit';
 
const testSchema = new mongoose.Schema({
    someField: String,
    some: {
        deepField: String
    }
});
 
testSchema.plugin(diffHistory);

/node-mongoose-audit/

    Package Sidebar

    Install

    npm i node-mongoose-audit

    Weekly Downloads

    0

    Version

    0.2.2

    License

    ISC

    Unpacked Size

    19.3 kB

    Total Files

    11

    Last publish

    Collaborators

    • rania_bys