Skip to content

Instantly share code, notes, and snippets.

@YordanGeorgiev
Created June 7, 2018 12:44
Show Gist options
  • Save YordanGeorgiev/20f8664da081952a865a1a9b2805c14c to your computer and use it in GitHub Desktop.
Save YordanGeorgiev/20f8664da081952a865a1a9b2805c14c to your computer and use it in GitHub Desktop.
[npm-cheat-sheet]npm cheat sheet #npm #cheat-sheet #nodejs
# file: ~/.npm_opts.company
export http_proxy=http://100.114.1.1:9090
export https_proxy=https://100.114.1.1:9090
npm config set registry http://registry.npmjs.org/
npm config set proxy $http_proxy
npm config set https-proxy $https_proxy
npm config set strict-ssl false
set HTTPS_PROXY=$https_proxy
set HTTP_PROXY=$http_proxy
export HTTPS_PROXY=$https_proxy
export HTTP_PROXY=$http_proxy
# eof file: ~/.npm_opts.company
# check the config
npm config list
npm config set https-proxy $https_proxy
npm config set proxy $http_proxy
# install insecurely by by-passing the proxy
npm --proxy:$https_proxy --without-ssl --insecure -g install html-pdf-chrome
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment