Accessing npm packages on a private server
Proget is a universal package manager used to deploy and access private code packages within a company or publicly outside. It is a very useful deployment tool to deliver reusable packages across teams.
If you have a nodejs package in any private repository, execute these commands .
- “npm config set registry {apiEndPoint}”
- “npm config strict-ssl false” — Optional only if the hosted repository is http and not https
- “npm config set always-auth true”
- “npm adduser” – Add credentials to connect to the private repository
Once above steps are successful, one can install the package hosted in the server, using “npm install {package-name}”
Happy coding!
Leave a comment