Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend the persistence layer to support more DB #4

Open
roccomuso opened this issue Aug 31, 2016 · 2 comments
Open

Extend the persistence layer to support more DB #4

roccomuso opened this issue Aug 31, 2016 · 2 comments
Assignees

Comments

@roccomuso
Copy link
Owner

roccomuso commented Aug 31, 2016

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.
roccomuso pushed a commit that referenced this issue Aug 31, 2016
@roccomuso roccomuso mentioned this issue Dec 31, 2016
@roccomuso roccomuso self-assigned this Feb 8, 2017
@ccollie
Copy link

ccollie commented Jan 14, 2020

I know this is years late, but i've started a fork using https://github.com/lukechilds/keyv

@roccomuso
Copy link
Owner Author

@ccollie Feel free to PR here using keyv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants