npm install microservice-proxy --save
Create the configuration:
Start the proxy:
microservice-proxy -c config.json -p 9000
;;;const app =;;
Originally, this module was going to manage processes themselves and dynamically assign port numbers. Unfortunately, it's a little complex to manage the dependencies between the process ports (leaving this for another day). I found
micro-proxy which is designed to do the same sort of thing, but it had a couple of issues - path matching and no HTTP/2 requests. I wrote this using ServieJS as an interesting case-study of how decoupling the request and response can lead to interesting mixups such as this (e.g. this could be deployed to AWS Lambda).
This project is written using TypeScript and publishes the definitions directly to NPM.