Détail du package

set-env-http-proxy-agent

wmzy14ISC0.1.2

Set the HTTP_PROXY and HTTPS_PROXY environment variables to use the node fetch API

readme

Set env http proxy agent

This package allows you to set the HTTP_PROXY and HTTPS_PROXY environment variables to enable the use of the node fetch API.

Usage

Globally

  • Installation
npm i -g set-env-http-proxy-agent

or pnpm

pnpm add -g set-env-http-proxy-agent
  • Export the environment variables by editing the ~/.zshrc or ~/.bashrc file
# export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 no_proxy=localhost,127.0.0.*

export NODE_OPTIONS="--import $(npm root -g)/set-env-http-proxy-agent/index.js"

Locally

  • Installation
npm i -D set-env-http-proxy-agent

or pnpm

pnpm add -D set-env-http-proxy-agent
  • Add to scripts
"scripts": {
    "start": "NODE_OPTIONS='--import set-env-http-proxy-agent' next dev"
}

See also

License

MIT