any-proxy-server
v1.0.0
Published
Any-proxy is a reverse-proxy server that can be easily set up through simple configuration.
Downloads
1
Readme
Any proxy;
Any-proxy is a reverse-proxy server that can be easily set up through simple configuration.
Usage:
var anyProxyServer = require("any-proxy-server");
const proxyServer = anyProxyServer([
{
type: "fakeResponse", //fake response
url:"/fake",
method: "get",
fakeResponse: {
data:"I'm fake data!"
},
},
{
type:"proxy", #support proxy to any host
url:"/",
method:"all", //support HTTP method: post, get, delete,put ...etc;
target:"" //your target host
}
]).startServerAt("127.0.0.1",8080,(err)=>{
if(err) throw err;
})