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 Answer
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.