requestify-pouchdb

1.0.0 • Public • Published

requestify pouchdb cache transporter

A cache transport for requestify that uses PouchDb

Installation

Currently, only works in node.

npm install requestify-pouchdb

Setup

Require the module and pass it to therequestify.cacheTransporter method.

var requestify = require('requestify');
requestify.cacheTransporter(require('requestify-pouchdb')());

Configuration

Currently, the only option for configuration is to set the path where PouchDb will write to.

var cache_dir = './cache';
var PouchdbCacheTransporter = require('requestify-pouchdb');
var cacheTransporter = new PouchdbCacheTransporter(cache_dir);

OR

var cacheTransporter = require('requestify-pouchdb)();

Tests

npm test

Package Sidebar

Install

npm i requestify-pouchdb

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • angelxmoreno