1. 设置代理
npm config set proxy=http://127.0.0.1:8087
npm config set registry=http://registry.npmjs.org
2. 关于https
npm config set https-proxy http://server:port
3. 使用带用户名和密码的代理
npm config set proxy http://username:password@server:port
npm confit set https-proxy http://username:password@server:port
4. 取消代理
npm config delete proxy
npm config delete https-proxy