npm 设置和取消代理的方法

付费节点推荐


免费节点


节点使用教程


设置代理

1 npm config set proxy=http://127.0.0.1:1080
2 npm config set registry=http://registry.npmjs.org

关于http

经过上面设置使用了http开头的源,因此不需要设http_proxy了,否则还要加一句

1 npm config set https-proxy http://server:port

 代理用户名和密码

1 npm config set proxy http://username:password@server:port
2 npm config set https-proxy http://username:passwprd@server:port

取消代理

1 npm config delete proxy
2 npm config delete https-proxy

未经允许不得转载:Bcoder资源网 » npm 设置和取消代理的方法

相关推荐

更多优质资源关注微信公众号: bcoder

bcoder
赞 (0)
分享到:更多 ()

评论 0

评论前必须登录!

登陆 注册