express-batching
A small higher order component for in-process batching and caching of API requests
Installation
$ npm install --save express-batching
Usage
const expressBatching = ;const app = ;const catRoutes = ; // normalapp; // with batchingapp; // accepting a hash function for parameterized requestsapp;
Contributing
Contribute!
TODOs
In order of importance
- get a cool logo
- optimize perf
- config param
- cache timeout
- max queue size
- setter injection for alternative cache (redis)
- moar tests
Testing
mocha --require clarify lib/index.test.js --watch
License
Apache-2.0 © blugavere