npm proxy code example
Example 1: setting proxy in npm
npm config set proxy http://username:password@host:port
npm config set https-proxy http://username:password@host:port
Example 2: npm install not workjing behind proxy
npm config set strict-ssl false
npm config set registry "http://registry.npmjs.org/"
npm --proxy http://username:[email protected]:80 install packagename
Example 3: set proxy for npm
proxy=http://username:password@host:port
https-proxy=http://username:password@host:port
https_proxy=http://username:password@host:port
Example 4: npm install proxy
npm config set proxy http://proxy_host:port