a quick ‘n dirty HTTP proxy with node.js
** work-in-progress **
Get ‘http-proxy’ module
npm install http-proxy
Code example to proxy request from localhost to another target host
Run and test
“node .”
Test with URL pointing to current host on port 5050. The request should be relayed to the target URL.
Motivation
– not using Eclipse with SAPUI5 plugin so there is no out-of-the-box Proxy servlet for local testing (Cross-Origins-Access issue)
– more options for “configuration” and great for some Javascript practice
Be the first to leave a comment
You must be Logged on to comment or reply to a post.