1.1.0 • Published 6 years ago

http-port-proxy v1.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

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>
1.1.0

6 years ago

1.0.1

7 years ago

1.0.0

7 years ago