how to configure .npmrc registry order?

1.9k Views Asked by At

enter image description here

could someone explain me what exactly going on here.

what is the difference between

registry = http://localhost:4873

vs

http://localhost:4873

why doesn't the default npm registry (registry.npmjs.org) have a similar format at line 1 ?

how to set the priority level - as in I want npm to look first in my local registry and then move onto the public registry.

Does the registry at line 1 have priority over the one at line 4 ?

thanks !

1

There are 1 best solutions below

1
On

Line 3 and 4 aren't registry definitions. They only define the authentication token to be used (as a key-value pair) for your local registry (line 3) and for the default npm registry (line 4).

Line 2 associates the scope flash with your local registry. If you for example publish a package with that scope, it will be automatically published to your local registry, using the authentication token specified in line 3.