详见我的博客:https://shengchangwei.github.io/verdaccio/git
npm install --global verdaccio
verdaccio
看到下图说明启动成功github
页面输入:localhost:4873shell
此时看到的页面应该以下:npm
npm set registry http://localhost:4873
npm adduser --registry http://localhost:4873
首次登录须要注册用户名和密码:安全
第二步启动服务后, 第一行有一个路径 config file 指向 config.yaml 这个文件是verdaccio 的配置项服务器
这个配置项中有:测试
auth: htpasswd file:帐号密码的文件地址,初始化时不存在,可指定须要手工建立。
max_users:默认1000,为容许用户注册的数量。
为-1时,不容许用户经过npm adduser注册。可是,当为-1时,能够经过直接编写htpasswd file内容的方式添加用户。有且只有一个用户code