flight-proxy-server
v1.0.5
Published
Simple Node proxy server
Downloads
3
Readme
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,
});