npm config the proxy

Using Npm Behind a Corporate Proxy

npm config set proxy http://proxy.company.com:8080
npm config set https-proxy http://proxy.company.com:8080

If you need to specify credentials, they can be passed in the url using the following syntax.

http://user_name:[email protected]:8080

Note: the npm config set command sets the proxy configuration in your .npmrc file.

npm --https-proxy=http://proxy.company.com:8080 -g install karma

你可能感兴趣的:(proxy,nodejs,npm)