Skip to content

Extend the persistence layer to support more DB #4

@roccomuso

Description

@roccomuso

API Example

var WebHooks = require('node-webhooks')
var InMemory = require('webhooks-memory-storage')
var FileStorage = require('webhooks-file-storage')

var webHooks = new WebHooks({
    db: new InMemory(),  // in-memory DB
    //db: new FileStorage('./webHooksDB.json'), // json file that store webhook URLs
    // redis, mongoDB, lokiJS, levelDB etc.
});

WebHooks Storage Implementation

Every webHooks store must be an EventEmitter and implement specific methods. The following methods are the list of required, recommended, and optional.

  • Required methods are ones that this module will always call on the store.
  • Recommended methods are ones that this module will call on the store if available.
  • Optional methods are ones this module does not call at all, but helps present uniform stores to users.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions