To launch Node.js app one needs to run node app.js
The app is to read data from Internet.
Now I work behind firewall and the target server is only available via proxy that is running as localhost:3213
I don't want to change OS setting and allow all apps to use the proxy.
How to specify proxy for launched Node.js app without changing JavaScript code?
Node options (listed with node -h
) don't give hint.
How can I use an http proxy with node.js http.Client? refers to altering Node app.
For Java I can pass [Java] system properties via -D parameters
java -Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=3213 -Dhttp.nonProxyHosts=”localhost|host.example.com” MyJavaApplication