nodejitsu/node-http-proxy — Issue #166: 500 Error: Both `options` and `options.target` are required.
Author: alnoor
Created: 2011-12-05 02:15:44+00:00
State: open

when use http-proxy in this manner - i do not have a problem - the target is reached.

httpProxy.createServer(function (req, res, proxy) {
var target = locations[1];
proxy.proxyRequest(req, res, target);

but i want to create server with express
so i do the following

var proxy = new httpProxy.HttpProxy();
proxy.proxyRequest(req, res, target);

i get the following 500 Error: Both `options` and `options.target` are required.

is there something else that is required.