Options for class constructor
clientMongoClient configured mongo client to use. Can be null if url is setdatabaseNamestring? name of the mongodb databasecollectionNamestring name of the mongodb collection used to store the resources
import { OneToFewResourceStorage } from '@discue/mongodb-resource-client'
const collectionName = 'api_clients'
const url = 'mongodb://127.0.0.1:27017'
const storage = new OneToFewResourceStorage({
url,
collectionName
})
storage.enableHistory()Simple resource class that will listen to storage events of the given storage object
Closes the database client
Returns void