multi-resource
v1.0.1
Published
A simple API gateway middleware
Downloads
6
Readme
multi-resource
An express middleware to fetch multiple resources from API with one request
Installation
npm i multi-resource
Usage
const express = require('express');
const mr = require('multi-resource');
const app = express();
app.use(mr());
app.listen(3000);
curl http://localhost:3000/api/resources?users=api/users
Also, see example
Options
basePath
- ('api')url
- ('resources')
Limitations
- Will not work with non
application/json
APIs - Will not work if API returns status code different from 200