当前位置: 首页 > 后端技术 > Node.js

【运维经典】第七章-节点(npm)加速(二)

时间:2023-04-03 12:42:03 Node.js

运维经典--目录节点(npm)加速上一期介绍了设置国内源解决npm慢问题的方法。本期介绍一个更简洁的方法——nrm。安装npminstallnrm-g--save查看使用方法(base)frank@deepin:~$nrm--helpUsage:nrm[options][command]Options:-V,--version输出版本号-h,--help输出使用信息命令:ls列出当前所有注册表ShowcurrentregistrynameuseChangeregistrytoregistryadd[home]Addonecustomregistryset-auth[options][value]使用base64编码字符串或用户名和密码为自定义注册表设置授权信息set-email为自定义注册表设置电子邮件set-hosted-repo为自定义注册表以发布包del删除一个自定义注册表主页<注册表>[浏览器]使用可选浏览器打开注册表主页发布[选项][|<文件夹>]如果当前注册表是自定义注册表,则将包发布到当前注册表。如果您没有使用自定义注册表,此命令将直接运行npmpublishtest[registry]ShowresponsetimeforspecificorallregistryhelpPrintthishelp查看当前源(base)frank@deepin:~$nrmlsnpm--------https://registry.npmjs.org/yarn------https://registry.yarnpkg.com/cnpm------http://r.cnpmjs.org/*淘宝-----https://registry.npm.taobao.org/nj--------https://registry.nodejitsu.com/npmMirror--https://skimdb.npmjs.com/registry/edunpm-----http://registry.enpmjs.org/切换源(base)frank@deepin:~$nrm使用cnpmRegistry已设置为:http://r.cnpmjs.org/