2.0.3 • Published 10 years ago

http-port-forward v2.0.3

Weekly downloads
9
License
MIT
Repository
github
Last release
10 years ago

Build Status NPM Version NPM Downloads Gitter Chat

Simple port forward for incoming HTTP requests, cross-platform supported base on Node.js.

Installation

$ npm install http-port-forward

Quick Start

Use the code below to create a file named sample.js

var forward = require('http-port-forward');

// forward all local 1088 port http requests to 88 port.
forward(1088, 88);

Run by Node.js. If you forward to port less than 1024 on Mac/Linux, you may need execute node by sudo

$ sudo node sample.js

Now you can use http://localhost:88 to visit the page on http://localhost:1088

API

forward(portForm, portTo, options)

  • portForm Number - Required, port NO. which you want to forward from
  • portTo Number - Required, port NO. which you want to forward to
  • options Object - Optional, options Config object passed to the forward
  • options.isPublicAccess Boolean - Optional, if true the new port will be accessible for others

License

MIT(LICENSE)

2.0.3

10 years ago

2.0.2

10 years ago

2.0.1

10 years ago

2.0.0

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago