1.0.0 • Published 8 years ago

requestify-pouchdb v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

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