There’s multiple ways to accomplish this.
-
use
npm config
to set the registry globally:npm config set registry http://nexus.dsv.myhost/nexus/repository/npmjs
-
use
npm config
to set the registry for the package scope:npm config set @<your scope here>:registry http://nexus.dsv.myhost/nexus/repository/npmjs
-
configure your package.json with a publish config:
{ ... "publishConfig": { "registry": "http://nexus.dsv.myhost/nexus/repository/npmjs" }, ... }
-
use
npmrc
to configure the registryregistry=http://nexus.dsv.myhost/nexus/repository/npmjs