詳見我的博客: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