Skip to Content
Author's profile photo D. Chia

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

Screenshot_17_07_2016__2_34_PM.jpg

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

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.