summaryrefslogtreecommitdiff
path: root/deps/npm/html/doc/misc/npm-registry.html
blob: fdddd5fbc254ecd1c86067f8605c6c49df3570f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<!doctype html>
<html>
  <title>npm-registry</title>
  <meta http-equiv="content-type" value="text/html;utf-8">
  <link rel="stylesheet" type="text/css" href="../../static/style.css">

  <body>
    <div id="wrapper">
<h1><a href="../misc/npm-registry.html">npm-registry</a></h1> <p>The JavaScript Package Registry</p>

<h2 id="DESCRIPTION">DESCRIPTION</h2>

<p>To resolve packages by name and version, npm talks to a registry website
that implements the CommonJS Package Registry specification for reading
package info.</p>

<p>Additionally, npm&#39;s package registry implementation supports several
write APIs as well, to allow for publishing packages and managing user
account information.</p>

<p>The official public npm registry is at <a href="http://registry.npmjs.org/">http://registry.npmjs.org/</a>.  It
is powered by a CouchDB database at
<a href="http://isaacs.iriscouch.com/registry">http://isaacs.iriscouch.com/registry</a>.  The code for the couchapp is
available at <a href="http://github.com/npm/npmjs.org">http://github.com/npm/npmjs.org</a>.  npm user accounts
are CouchDB users, stored in the <a href="http://isaacs.iriscouch.com/_users">http://isaacs.iriscouch.com/_users</a>
database.</p>

<p>The registry URL is supplied by the <code>registry</code> config parameter.  See
<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
npm&#39;s configuration.</p>

<h2 id="Can-I-run-my-own-private-registry">Can I run my own private registry?</h2>

<p>Yes!</p>

<p>The easiest way is to replicate the couch database, and use the same (or
similar) design doc to implement the APIs.</p>

<p>If you set up continuous replication from the official CouchDB, and then
set your internal CouchDB as the registry config, then you&#39;ll be able
to read any published packages, in addition to your private ones, and by
default will only publish internally.  If you then want to publish a
package for the whole world to see, you can simply override the
<code>--registry</code> config for that command.</p>

<h2 id="I-don-t-want-my-package-published-in-the-official-registry-It-s-private">I don&#39;t want my package published in the official registry. It&#39;s private.</h2>

<p>Set <code>&quot;private&quot;: true</code> in your package.json to prevent it from being
published at all, or
<code>&quot;publishConfig&quot;:{&quot;registry&quot;:&quot;http://my-internal-registry.local&quot;}</code>
to force it to be published only to your internal registry.</p>

<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>

<h2 id="Will-you-replicate-from-my-registry-into-the-public-one">Will you replicate from my registry into the public one?</h2>

<p>No.  If you want things to be public, then publish them into the public
registry using npm.  What little security there is would be for nought
otherwise.</p>

<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>

<p>No, but it&#39;s way easier.  Basically, yes, you do, or you have to
effectively implement the entire CouchDB API anyway.</p>

<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>

<p>Yes, head over to <a href="https://npmjs.org/">https://npmjs.org/</a></p>

<h2 id="SEE-ALSO">SEE ALSO</h2>

<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>
</div>
<p id="footer">npm-registry &mdash; npm@1.4.2</p>
<script>
;(function () {
var wrapper = document.getElementById("wrapper")
var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0)
  .filter(function (el) {
    return el.parentNode === wrapper
        && el.tagName.match(/H[1-6]/)
        && el.id
  })
var l = 2
  , toc = document.createElement("ul")
toc.innerHTML = els.map(function (el) {
  var i = el.tagName.charAt(1)
    , out = ""
  while (i > l) {
    out += "<ul>"
    l ++
  }
  while (i < l) {
    out += "</ul>"
    l --
  }
  out += "<li><a href='#" + el.id + "'>" +
    ( el.innerText || el.text || el.innerHTML)
    + "</a>"
  return out
}).join("\n")
toc.id = "toc"
document.body.appendChild(toc)
})()
</script>