getthemall-stream
v1.0.6
Published
Get them all - express middleware
Downloads
7
Readme
debitoor
Technical task. Get them all - express middleware
Description
Make API handle that - build a reusable module/middleware for GETting multiple resources in one go. Should be easy to inject into any existing express app / api.
Usage
npm install getthemall-stream
then add endpoint in your express application
app.get('/api/resources', require('getthemall-stream'));
Example of final use
GET api/resources ? users=api/users & customer=api/customers/23 & countries=api/countries ..
returns {users: [..], customer: {..}, countries: [..] }
Caution
Node.js v7.6 or later needed.
Async function used for handling serial promises execution.