NOTE
StrongLoop Arc and slc are no longer under active development, and will soon be deprecated. Arc's features are being included in the IBM API Connect Developer Toolkit: Please use it instead.
Skip to end of metadata
Go to start of metadata

Overview

The public npm registry at http://npmjs.org is a common way to publish open-source code.  When you have proprietary code, you may also want to set up a private package registry.  

Using multiple registries for a single project enables you to easily combine both open-source modules from the public npm registry and proprietary modules from your private registry.  You may also want to use multiple private registries, for example a company-wide registry for stable modules and multiple team registries with nightly builds.

Use the slc registry command to easily work with multiple registries.  It provides the following sub-commands:

  • add - Create a new registry configuration with the given name.
  • list - List configured registries. 
  • remove - Remove the specified registry configuration and related files. 
  • use - Use one of the registry configurations created with the add command
  • promote - Promote a given package version to another registry.

Prerequisites

If you have not already done so, follow the steps Getting started with StrongLoop Controller (tutorial) to install the slc command-line tool.

Icon

You'll also need a private package registry. For an example of how to do this, see Maintaining a Private NPM registry for your Organization with Sinopia.

Configuring slc to use a private registry

Follow these steps to configure slc to use your private npm registry instead of the public npm registry:

  1. Add a new configuration entry for your private registry:

    The configuration wizard will prompt you for configuration options: 

  2. Switch your npm client to use the private registry:

  3. To switching back to the public npmjs.org registry use the command:

Promoting a package

Assuming you already followed the steps in the previous section to set up a registry, follow these steps to promote a package from a private to a public registry:

  1. Publish a package to the private registry 

  2.  Promote a package version to the public registry 

More information

For more information, see:

  • No labels