http-port-proxy
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

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>

Readme

Keywords

Package Sidebar

Install

npm i http-port-proxy

Weekly Downloads

0

Version

1.1.0

License

MIT

Last publish

Collaborators

  • varharrie