二、本地npm服务配置及使用


  在上一篇中,我们已经搭建好了本地npm服务,这一篇中,我们将通过工具nrm配置客户端的npm

  1、通过npm安装全局nrm

npm install -g nrm

  2、通过nrm添加私有npm服务镜像地址

nrm add my http://serviceIP:4873  # 添加本地的npm镜像地址
 

  3、使用私有npm服务镜像地址

nrm use my # 使用本址的镜像地址     my为你要增加的地址

  4、私有npm服务增加用户

npm adduser
Username: test
Password: test
Email: (this IS public) xxx@xxxx

  5、登陆私有npm服务

npm login

  6、完成公共模块的发布

npm publish

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM