NOPAR

Node PAckage Registry

View the Project on GitHub afbobak/nopar

Provides a local NPM registry that also proxies and caches unknown node packages from the original npm registry at http://registry.npmjs.org.

Build Status

Install the server

It's available from the official NPM registry, so all you need is:

npm install -g nopar

On my build server I create an archive (see scripts/package) and extract the whole shebang into /usr/local/nopar with an install script (see scripts/install-nopar.sh).

Usage

If you installed NOPAR via npm install -g nopar, then a start script is be installed into your path and you can simply run:

nopar

With the default configuration, the registry is available at http://localhost:5984/. Point your browser at it and you should see an empty registry.

Fill your local registry by configuring the npm command to use it:

npm config set registry http://localhost:5984/
npm cache clear
npm login

Sometimes npm seems confused with cached packages from other repositories, clearing the cache remedies those issues.

The login is required for npm to work but NOPAR doesn't implement any user management and currently accepts everyone.

Install packages with npm install PACKAGE and NOPAR will automatically proxy and cache the packages and dependencies into your private NOPAR.

Of course you can also publish to NOPAR. Those packages won't get promoted to the official registry by NOPAR and will be marked with a green "local" tag in the browser interface.

For configuring the registry, see the section "Default Environment Variables" below.

Default Environment Variables

The service's defaults are configured via environment variables. The following parameters are available:

If the environment variable NOPAR_RUNAS_USER is set, the service will run as a daemon.

You can override some of those settings from within NOPAR on the Settings page. Everything that is set in the Settings page takes priority over the environment variables.

Upstart Configuration

There's an example upstart configuration file that you can use and adapt for your own purpose:

scripts/nopar.conf

Known Issues