flight-proxy-server
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

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

Dependents (0)

Package Sidebar

Install

npm i flight-proxy-server

Weekly Downloads

2

Version

1.0.5

License

MIT

Unpacked Size

3.05 kB

Total Files

4

Last publish

Collaborators

  • kolserdav