gem加速
一、更新gem
$ gem update
$ gem -v
二、更改地址
$ gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/
$ gem sources -l
执行后显示如图就成功了
npm加速
1.$ npm config set registry https://registry.npm.taobao.org
2.当出现警告时 ,可以使用下面代码
$ npm config set registry https://mirrors.huaweicloud.com/repository/npm/
$ npm config get registry
如图第三行输出就完成了