Nexus:NPM: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{| | valign="top" | '''Recipe Types:''' ────────────────────────────────────────── nexus...") |
|||
(7 intermediate revisions by the same user not shown) | |||
Line 20: | Line 20: | ||
==Blob Store== | ==Blob Store== | ||
Admin : https://cdn.chorke.org/nexus/#admin/repository/blobstores | Admin : https://cdn.chorke.org/nexus/#admin/repository/blobstores | ||
Path : /nexus-data/blobs/npm-registry | Path : /nexus-data/blobs/npm-registry | ||
Name : npm-registry | Name : npm-registry | ||
Admin : https://cdn.chorke.org/nexus/#admin/repository/blobstores | Admin : https://cdn.chorke.org/nexus/#admin/repository/blobstores | ||
Path : /nexus-data/blobs/npm-private | Path : /nexus-data/blobs/npm-private | ||
Name : npm-private | Name : npm-private | ||
Admin : https://cdn.chorke.org/nexus/#admin/repository/blobstores | Admin : https://cdn.chorke.org/nexus/#admin/repository/blobstores | ||
Path : /nexus-data/blobs/npm-group | Path : /nexus-data/blobs/npm-group | ||
Name : npm-group | Name : npm-group | ||
==Repository== | ==Repository== | ||
Admin : https://cdn.chorke.org/nexus/#admin/repository/repositories | Admin : https://cdn.chorke.org/nexus/#admin/repository/repositories | ||
Policy : Allow redeploy | Policy : Allow redeploy | ||
Storage : npm-private | Storage : npm-private | ||
Name : npm-private | Name : npm-private | ||
Admin : https://cdn.chorke.org/nexus/#admin/repository/repositories | Admin : https://cdn.chorke.org/nexus/#admin/repository/repositories | ||
proxy : https://registry.npmjs.org | proxy : https://registry.npmjs.org | ||
Storage : npm-registry | Storage : npm-registry | ||
Name : npm-registry | Name : npm-registry | ||
Admin : https://cdn.chorke.org/nexus/#admin/repository/repositories | Admin : https://cdn.chorke.org/nexus/#admin/repository/repositories | ||
Members : npm-registry, npm-private | Members : npm-registry, npm-private | ||
Storage : npm-group | Storage : npm-group | ||
Name : npm | Name : npm | ||
==Security== | |||
<source lang="bash"> | |||
NEXUS_NPM_AUTH=`echo -n 'academia:sadaqah!'|openssl base64` | |||
cat <<EOF >> $HOME/.npmrc | |||
registry=https://cdn.chorke.org/nexus/repository/npm/ | |||
_auth=$NEXUS_NPM_AUTH | |||
email= [email protected] | |||
EOF | |||
</source> | |||
<source lang="bash"> | |||
npm config set @academia:registry https://cdn.chorke.org/nexus/repository/npm/ | |||
npm --registry https://cdn.chorke.org/nexus/repository/npm/ install -g express | |||
npm adduser --registry=https://cid.chorke.org/nexus/repository/npm/ | |||
npm install | |||
npm publish | |||
</source> | |||
<code>package.json:</code> | |||
<source lang="json"> | |||
{ | |||
... more ... | |||
"publishConfig": { | |||
"registry": "https://cdn.chorke.org/nexus/repository/npm-private/" | |||
} | |||
} | |||
</source> | |||
==References== | ==References== | ||
* [https://blog.sonatype.com/using-nexus-3-as-your-repository-part-2-npm-packages Configure Nexus NPM Repository] | * [https://blog.sonatype.com/using-nexus-3-as-your-repository-part-2-npm-packages Configure Nexus NPM Repository] | ||
* [[Nexus]] | * [[Nexus]] |
Latest revision as of 06:20, 25 January 2021
Recipe Types: ────────────────────────────────────────── nexus/repository/recipe/types ─┬──────────────────────────────────────── ├─ group ├─ proxy └─ host |
Repositories: ────────────────────────────────────────── https://cdn.chorke.org/nexus/repository/ ─┬──────────────────────────────────────── ├─ npm-registry/ [proxy] ├─ npm-private/ [host ] └─ npm/ [group] |
Blob Store
Admin : https://cdn.chorke.org/nexus/#admin/repository/blobstores Path : /nexus-data/blobs/npm-registry Name : npm-registry
Admin : https://cdn.chorke.org/nexus/#admin/repository/blobstores Path : /nexus-data/blobs/npm-private Name : npm-private
Admin : https://cdn.chorke.org/nexus/#admin/repository/blobstores Path : /nexus-data/blobs/npm-group Name : npm-group
Repository
Admin : https://cdn.chorke.org/nexus/#admin/repository/repositories Policy : Allow redeploy Storage : npm-private Name : npm-private
Admin : https://cdn.chorke.org/nexus/#admin/repository/repositories proxy : https://registry.npmjs.org Storage : npm-registry Name : npm-registry
Admin : https://cdn.chorke.org/nexus/#admin/repository/repositories Members : npm-registry, npm-private Storage : npm-group Name : npm
Security
NEXUS_NPM_AUTH=`echo -n 'academia:sadaqah!'|openssl base64`
cat <<EOF >> $HOME/.npmrc
registry=https://cdn.chorke.org/nexus/repository/npm/
_auth=$NEXUS_NPM_AUTH
email= [email protected]
EOF
npm config set @academia:registry https://cdn.chorke.org/nexus/repository/npm/
npm --registry https://cdn.chorke.org/nexus/repository/npm/ install -g express
npm adduser --registry=https://cid.chorke.org/nexus/repository/npm/
npm install
npm publish
package.json:
{
... more ...
"publishConfig": {
"registry": "https://cdn.chorke.org/nexus/repository/npm-private/"
}
}