JavaScript Answers

How to set Node.js global proxy setting?

Spread the love

To set Node.js global proxy setting, we use the global-tunnel-ng package.

For instance, we write

const globalTunnel = require("global-tunnel-ng");

  host: "",
  port: 8080,
  proxyAuth: "userId:password",
  sockets: 50,

to call initialize with an object with the proxy options and credentials to connect to the proxy.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published.