Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
https.createServer(credentials, function (req, res) {
Object.keys(options.routingTable).some(function (key) {
const regX = new RegExp(key);
if (regX.test(req.url)) {
printMe(req.url + ' => ' + (options.routingTable[key].targetName || options.routingTable.target));
proxy.web(req, res, options.routingTable[key]);
curTarget = options.routingTable[key];
return true;
}
});
}).listen(options.home_port);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.