npm.io
1.0.6 • Published 9 years ago

getthemall-stream

Licence
ISC
Version
1.0.6
Deps
0
Vulns
0
Weekly
0

debitoor

Technical task. Get them all - express middleware

Build Status

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.