我是靠谱客的博主 热心泥猴桃,这篇文章主要介绍nodejs 设置proxy,现在分享给大家,希望可以做个参考。

为npm设置代理(转自:http://www.cnblogs.com/huang0925/archive/2013/05/17/3083207.html

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

如果代理需要认证的话可以这样来设置。

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

如果代理不支持https的话需要修改npm存放package的网站地址。

1
$ npm config set registry "http://registry.npmjs.org/"

最后

以上就是热心泥猴桃最近收集整理的关于nodejs 设置proxy的全部内容,更多相关nodejs内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(51)

评论列表共有 0 条评论

立即
投稿
返回
顶部