requestify-pouchdb
v1.0.0
Published
A cache transport for requestify that uses PouchDb
Downloads
3
Maintainers
Readme
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