http-port-proxy
v1.1.0
Published
HTTP port proxying library.
Downloads
9
Readme
http-port-proxy
HTTP port proxying library.
Usage
npm install --save http-port-proxy
import start from 'http-port-proxy'
const targets = [
{
condition: {
host: "www.sb.com", // host: string | RegExp
// url: string | RegExp
},
host: "www.baidu.com", // default to "localhost"
port: 80 // default to 80
}
]
start({
targets,
// port: 80 // default to 80
})
.then((/* server */) => console.log('Server is listening...'))
CLI
npm install -g http-port-proxy
http-port-proxy <config-path>