1.0.0 • Published 7 years ago

basic-http-proxy v1.0.0

Weekly downloads
2
License
ISC
Repository
github
Last release
7 years ago

basic-http-proxy

npm version Node.js dependencies npm downloads

Basic HTTP/S proxy that simply works. Support both HTTP and HTTPS.

Installation

Type npm install basic-http-proxy -g to install.

How to use

There are few ways to use the proxy:

  • Thru command-line interface
  • Thru another Node.js program
  • Run it in Docker

Running it with command-line interface

Type proxy and it will start listening to port 8080.

To configure it to run under port 8888, set environment variable PORT to 8888.

Running it in Node.js

You can also run the proxy inside another Node.js program.

require('basic-http-proxy')({
  port: 8080
});

Running it with Docker

The proxy server can be run under Docker with node:alpine image.

docker build -t proxy .
docker run -d -p 8080:8080 proxy

Configuration

To configure the behavior of the proxy, you can either specify in environment variable, or thru JSON object.

Env var nameJSON nameDescriptionDefault
PORTportPort the server will listen to8080

Roadmap

Check out this list for planned features.

Contributions

Like us? Star us.

Found a bug? File us an issue.