3 <title>npm-registry</title>
4 <meta http-equiv="content-type" value="text/html;utf-8">
5 <link rel="stylesheet" type="text/css" href="../../static/style.css">
9 <h1><a href="../misc/npm-registry.html">npm-registry</a></h1> <p>The JavaScript Package Registry</p>
11 <h2 id="DESCRIPTION">DESCRIPTION</h2>
13 <p>To resolve packages by name and version, npm talks to a registry website
14 that implements the CommonJS Package Registry specification for reading
17 <p>Additionally, npm's package registry implementation supports several
18 write APIs as well, to allow for publishing packages and managing user
19 account information.</p>
21 <p>The official public npm registry is at <a href="http://registry.npmjs.org/">http://registry.npmjs.org/</a>. It
22 is powered by a CouchDB database at
23 <a href="http://isaacs.iriscouch.com/registry">http://isaacs.iriscouch.com/registry</a>. The code for the couchapp is
24 available at <a href="http://github.com/isaacs/npmjs.org">http://github.com/isaacs/npmjs.org</a>. npm user accounts
25 are CouchDB users, stored in the <a href="http://isaacs.iriscouch.com/_users">http://isaacs.iriscouch.com/_users</a>
28 <p>The registry URL is supplied by the <code>registry</code> config parameter. See
29 <code><a href="../cli/npm-config.html">npm-config(1)</a></code>, <code><a href="../files/npmrc.html">npmrc(5)</a></code>, and <code><a href="../misc/npm-config.html">npm-config(7)</a></code> for more on managing
30 npm's configuration.</p>
32 <h2 id="Can-I-run-my-own-private-registry">Can I run my own private registry?</h2>
36 <p>The easiest way is to replicate the couch database, and use the same (or
37 similar) design doc to implement the APIs.</p>
39 <p>If you set up continuous replication from the official CouchDB, and then
40 set your internal CouchDB as the registry config, then you'll be able
41 to read any published packages, in addition to your private ones, and by
42 default will only publish internally. If you then want to publish a
43 package for the whole world to see, you can simply override the
44 <code>--registry</code> config for that command.</p>
46 <h2 id="I-don-t-want-my-package-published-in-the-official-registry-It-s-private">I don't want my package published in the official registry. It's private.</h2>
48 <p>Set <code>"private": true</code> in your package.json to prevent it from being
50 <code>"publishConfig":{"registry":"http://my-internal-registry.local"}</code>
51 to force it to be published only to your internal registry.</p>
53 <p>See <code><a href="../files/package.json.html">package.json(5)</a></code> for more info on what goes in the package.json file.</p>
55 <h2 id="Will-you-replicate-from-my-registry-into-the-public-one">Will you replicate from my registry into the public one?</h2>
57 <p>No. If you want things to be public, then publish them into the public
58 registry using npm. What little security there is would be for nought
61 <h2 id="Do-I-have-to-use-couchdb-to-build-a-registry-that-npm-can-talk-to">Do I have to use couchdb to build a registry that npm can talk to?</h2>
63 <p>No, but it's way easier. Basically, yes, you do, or you have to
64 effectively implement the entire CouchDB API anyway.</p>
66 <h2 id="Is-there-a-website-or-something-to-see-package-docs-and-such">Is there a website or something to see package docs and such?</h2>
68 <p>Yes, head over to <a href="https://npmjs.org/">https://npmjs.org/</a></p>
70 <h2 id="SEE-ALSO">SEE ALSO</h2>
72 <ul><li><a href="../cli/npm-config.html">npm-config(1)</a></li><li><a href="../misc/npm-config.html">npm-config(7)</a></li><li><a href="../files/npmrc.html">npmrc(5)</a></li><li><a href="../misc/npm-developers.html">npm-developers(7)</a></li><li><a href="../misc/npm-disputes.html">npm-disputes(7)</a></li></ul>
74 <p id="footer">npm-registry — npm@1.3.17</p>
77 var wrapper = document.getElementById("wrapper")
78 var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0)
79 .filter(function (el) {
80 return el.parentNode === wrapper
81 && el.tagName.match(/H[1-6]/)
85 , toc = document.createElement("ul")
86 toc.innerHTML = els.map(function (el) {
87 var i = el.tagName.charAt(1)
97 out += "<li><a href='#" + el.id + "'>" +
98 ( el.innerText || el.text || el.innerHTML)
103 document.body.appendChild(toc)