Features:
- easy to use
- support HTTPs
- debug traces via debug
Installation of the npm package:
> npm i install --save proxy-http-request
var proxyHttpRequest = require('proxy-http-request');
var http = require('http');
http.createServer(function (req, res) {
// Redirect all incoming request to example.org.
proxyHttpRequest('http://example.org' + req.url, req, res);
}).listen(8000);With debug traces:
> DEBUG=proxyHttpRequest node example.js
proxyHttpRequest parsing URL http://example.org/foo +0ms
proxyHttpRequest proxying GET http://example.org/foo +8ms
> npm install
The sources files are watched and automatically recompiled on changes.
> npm run dev
> npm run test-dev
Contributions are very welcomed, either on the documentation or on the code.
You may:
- report any issue you've encountered;
- fork and create a pull request.
ISC © Julien Fontanet
