easy-proxy-gate

Super simple proxy using http-proxy

Usage no npm install needed!

<script type="module">
  import easyProxyGate from 'https://cdn.skypack.dev/easy-proxy-gate';
</script>

README

easy-proxy-gate

npm install --save easy-proxy-gate

Example

Below example will produce a server that will route every request to foo.bar.com to port 9001, everything else will go to port 9000.

const easyProxyGate = require('easy-proxy-gate');

app.use(easyProxyGate([
  {
    subdomain: 'default',
    target: 'http://localhost:9000',
  },
  {
    subdomain: 'foo',
    target: 'http://localhost:9001',
  },
]));