1

I want to execute "node index.js" through a http proxy . Inside the js file there are some libraries that make http requests by axios and I need to route all requests through a proxy without changing the libraries. How can I do it? (I execute the node command or pm2 in linux shell)

1
  • Possible duplicate of this question Commented Dec 28, 2017 at 8:41

1 Answer 1

0

Maybe this link can help you: Node.js global proxy setting

that means: you should use a module(global-tunnel), and set proxy to that module, then other modules can use proxy. Hope this help.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.