npm-proxy

A proxy server for npm to publish packages to a child/private registry and install packages from a child or parent/public registry (if the child doesn't have the package).

A proxy server for npm to publish packages to a child/private registry and install packages from a child or parent/public registry (if the child doesn't have the package).

  1. Run (force install because http-proxy doesn't support node 0.6.x):

    npm install npm-proxy --force

  2. Run locally:

    ./bin/npm-proxy --child-registry-target http://mysecret.npmjs.org:5984

  1. Install npm-proxy globally

    sudo npm install -g npm-proxy --force

  2. Add the following line to the os_daemons section of /etc/couchdb/local.ini on the child npm registry:

    npm_proxy = /usr/bin/npm-proxy --child-registry-target http://mysecret.npmjs.org:5984

  3. Restart couchdb and make sure npm-proxy started with it

Usage: npm-proxy [options]

Options:

  -h, --help                                            output usage information
  -V, --version                                         output the version number
  -t, --target [localhost:8080]                         hostname and port to listen on
  -c, --child-registry-target [localhost:5984]          NPM registry to push packages and pull from first
  -p, --parent-registry-target [registry.npmjs.org:80]  NPM registry to pull packages from if the child doesn't have it

Once the proxy is running point npm to it using any of the methods from "Using the registry with the npm client" section of the npmjs.org project.