1.0.0 • Published 9 years ago
basic-http-proxy v1.0.0
basic-http-proxy
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 proxyConfiguration
To configure the behavior of the proxy, you can either specify in environment variable, or thru JSON object.
| Env var name | JSON name | Description | Default |
|---|---|---|---|
PORT | port | Port the server will listen to | 8080 |
Roadmap
Check out this list for planned features.
Contributions
Like us? Star us.
Found a bug? File us an issue.
1.0.0
9 years ago