使用开源框架verdaccio

安装

  1. npm install -g verdaccio

使用

  1. verdaccio --listen <port> --config ./config.yaml
  1. storage: ./storage
  2. auth:
  3. htpasswd:
  4. file: ./htpasswd
  5. uplinks:
  6. npmjs:
  7. url: https://registry.npmjs.org/
  8. cpm:
  9. url: https://registry.npmmirror.com/
  10. packages:
  11. "@company/*":
  12. access: $all
  13. publish: $all
  14. "**":
  15. access: $all
  16. proxy: cpm
  17. logs: { type: stdout, format: pretty, level: http }