AZ-400 · Question #79
Drag and Drop Question You are implementing a package management solution for a Node.js application by using Azure Artifacts. You need to configure the development environment to connect to the packag
The correct answer is The .npmrc file in the project; The .npmrc file in the user's home folder. The correct arrangement uses two .npmrc files for different purposes: the project-level .npmrc file stores the registry URL and non-sensitive configuration (pointing to the Azure Artifacts feed), while the user's home folder .npmrc file stores the authentication credentials/token
Question
Exhibits
Answer Area
Drag items
Correct arrangement
- The .npmrc file in the project
- The .npmrc file in the user's home folder
Explanation
The correct arrangement uses two .npmrc files for different purposes: the project-level .npmrc file stores the registry URL and non-sensitive configuration (pointing to the Azure Artifacts feed), while the user's home folder .npmrc file stores the authentication credentials/tokens. This separation ensures credentials are kept out of source control (since the home folder .npmrc is never committed to a repository), minimizing the risk of credential leakage. Azure Artifacts explicitly recommends this two-file pattern to separate registry configuration from authentication.
Topics
Community Discussion
No community discussion yet for this question.

