使用 cnpmjs.org 搭建私有npm仓库

按照 https://github.com/cnpm/cnpmjs.org/wiki/Deploy-a-private-npm-registry-in-5-minutes 说的步骤一步一步来即可。

里面有几个没有说明的地方:
1、默认是只有本地访问的,没有监听0.0.0.0,需要修改$HOME/.cnpmjs.org/config.json,添加bindingHost: "0.0.0.0"
2、发布私有包之后,install时出现404,因为没有配置registryHost,同样需要修改config.json,添加registryHost: "your url"

参考:https://github.com/cnpm/cnpmjs.org/wiki/CNPM%E9%85%8D%E7%BD%AE%E6%8C%87%E5%8D%97%E3%80%90%E5%AE%9E%E6%88%98%E5%A1%AB%E5%9D%91%E3%80%91

你可能感兴趣的:(使用 cnpmjs.org 搭建私有npm仓库)