0.0.1 • Published 2 years ago

express-auditor-mongodb-store v0.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

express-auditor-mongodb-store

Save express-auditor result into MongoDB

Installation

Install this package and express-auditor in your NodeJS project

$ yarn add express-auditor express-auditor-mongodb-store

or

$ npm i express-auditor express-auditor-mongodb-store

Getting Started

Follow this Getting Started to understand why express-auditor works

import { createAuditor } from 'express-auditor'
import { createMongoDBAuditorStorage } from 'express-auditor-mongodb-store'

const { auditor, handler } = createAuditor()

auditor.on(
  'finish',
  createAuditorStorage({
    connectionString: 'mongodb://localhost:27017',
    database: 'example',
    collection: 'my_application-logs',
  })
)