@waveorb/failure
v1.0.1
Published
Waveorb failure
Downloads
128
Readme
Waveorb failure
Waveorb failure writes failures to the database.
Based on MongoDB. Saves failures in the 'failure' collection in the database.
Install
npm install @waveorb/failure
Usage
// Requires mongowave
var mongodb = require('mongowave')
var db = await mongodb('firmalisten')
var failures = require('@waveorb/failure')({ db })
// The name of the failure
var name = 'failure-name'
// The message
var message = 'This failed'
// Data
var data = { some: 'data' }
// Register failure
await failures.register({ name, message, data })
// Remove all failures
var result = await failures.clear()
Created by Eldøy Projects
Enjoy!