# https://verdaccio.org/docs/configuration#uplinks # a list of other known repositories we can talk to uplinks: npmjs: # 修改npm代理地址为淘宝源 url:https://registry.npmmirror.com
# Learn how to protect your packages # https://verdaccio.org/docs/protect-your-dependencies/ # https://verdaccio.org/docs/configuration#packages packages: "@*/*": # scoped packages # 访问权限 $all 对所有人开放 access:$all # 发布权限,只对登录用户开放 publish:$authenticated # 取消发布,只有admin用户可以操作 unpublish:admin # if package is not available locally, proxy requests to 'npmjs' registry # 关闭代理,代理的包会缓存到设备上,占用大量空间 # proxy: npmjs
auth: htpasswd: file:./htpasswd # Maximum amount of users allowed to register, defaults to "+inf". # 设为-1,关闭注册功能 # max_users: 1000 # Hash algorithm, possible options are: "bcrypt", "md5", "sha1", "crypt". algorithm:bcrypt# by default is crypt, but is recommended use bcrypt for new installations # Rounds number for "bcrypt", will be ignored for other algorithms. rounds:10
listen: -0.0.0.0:4873# listen on all addresses (INADDR_ANY)
配置nginx反向代理
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
server { listen80; # 域名 server_name npm.etsme.com; charset utf-8;