Npm 换源

临时源

1
npm --registry https://registry.npm.taobao.org install express

永久源

1
npm config set registry https://registry.npm.taobao.org

cnpm

1
npm install -g cnpm --registry=https://registry.npm.taobao.org

官方镜像

1
npm config set registry https://registry.npmjs.org/

查看源地址

1
npm config get registry