How to use verdaccio to create private npm registry

How to use verdaccio to create private npm registry?

  1. npm i -g verdaccio
  2. npm set registry http://localhost:4873
  3. verdaccio // to start verdaccio
  4. npm adduser --registry http://localhost:4873
  5. type http://localhost:4873 in bowser adress bar and enter
  6. revise verdaccio config file

    • open a terminal
    • gedit /home/abby/.config/verdaccio/config.yaml
    • add line max_body_size: 1000mb in the bottom line. // Set enough large size so that we can publish large package
    • change all access:@all to access:$authenticated
  7. restart verdaccio
    verdaccio
  8. check our current registry
    npm get registry
  9. publish packages in specific registry
    npm publish --registry http://111.11.11.111
  10. remove package if has mistakes
    npm unpublish --force myLibrary

How to start verdaccio forever?
    1. npm list verdaccio -g
    2. sudo cp /home/abby/.nvm/versions/node/v13.0.1/lib/node_modules/verdaccio/systemd/verdaccio.service /lib/systemd/system/ && sudo systemctl daemon-reload

你可能感兴趣的:(verdaccio,npm,node.js)