PIPA GATEWAY
A NodeJS module to help you create an API Gateway in an easy way.
Why PIPA GATEWAY
The concept of PIPA GATEWAY is similar to PipaJS, to enable developer to create an orchestrator or an API Gateway or a proxy in easy way.
Installation
$ npm install pipa-gateway var express = requirevar app = var PipaGateway = require; // PipaGateway// @param object Express app// @param string File json config// @param string Middleware folder var pipaGateway = new PipaGateway
How-To
There are 3 features in pipa gateway, proxy
, parallel
and chain
.
PROXY
Proxy
will forward your request to services.
PARALLEL
Parallel
will request parallel to multilple services.
Chain
Chain
will request chain to multiple services, the next request will process after previous request successfully and can set parameter to the next request based on result on previous request.
Code Example
You can try to run the code example in example
folder.