1.0.5 • Published 9 months ago

flight-proxy-server v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

flight-proxy-server

Simple Node proxy server with getting the address on each request through callback getServer.

Install

npm i flight-proxy-server

Usage

const { proxy } = require('flight-proxy-server');

const getServer = async (req) => {
  console.log(req.url);
  // ... here check which server to forward the request to
  const result = {
    url: 'http://localhost:3000',
  };
  return result;
};

proxy({
  port: 3003,
  getServer,
});

Examples

examples/index.js

1.0.5

9 months ago

1.0.4

9 months ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago