Created
February 6, 2017 16:23
-
-
Save JeremyNevill/3b8f1c2742588c402729f05b0bf3ca60 to your computer and use it in GitHub Desktop.
Configure Windows Npm Proxy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Configure Windows Npm Proxy | |
| # =========================== | |
| # Including custom registry and proxy url/port | |
| # Note: Will pop up the npm config window to see the mods when it runs | |
| $ProxyUrlPort="YourProxyUrl:YourProxyPort" | |
| $CustomRegistry="http://YourCustomRegistySuchAsArtifactory/api/npm" | |
| function Configure-Windows-Npm-Proxy{ | |
| & npm config set registry $CustomRegistry | |
| & npm config set "export http-proxy" "http://$ProxyUrlPort" | |
| & npm config set "export https-proxy" "http://$ProxyUrlPort" | |
| } | |
| Configure-Windows-Npm-Proxy | |
| npm config edit | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment