Accessing npm packages on a private server

less than 1 minute read

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 .

  1. “npm config set registry {apiEndPoint}”
  2. “npm config strict-ssl false” — Optional only if the hosted repository is http and not https
  3. “npm config set always-auth true”
  4. “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