Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 2. Installing the circuit breaker add-on from the Red Hat customer registry
The circuit breaker add-on for Red Hat build of Node.js is a fully supported implementation of the open source Opossum module. Red Hat provides the circuit breaker add-on as the @redhat/opossum
module. You can download and install the @redhat/opossum
module from the Red Hat customer registry.
Procedure
- On the command line, access the root directory of your Node.js application.
To specify the download paths for installing Node.js modules, complete the following steps:
-
In the root directory of your application, create a file named
.npmrc
. To specify the path to the Red Hat customer registry, enter the following line in the
.npmrc
file:@redhat:registry=https://npm.registry.redhat.com
To specify the path to the npm registry, enter the following line in the
.npmrc
file:registry=https://registry.npmjs.org
-
Save the
.npmrc
file.
-
In the root directory of your application, create a file named
To download and install the
@redhat/opossum
module, enter the following command:$ npm install @redhat/opossum
Verification
-
If a
node_modules
directory already exists in your project, the@redhat/opossum
module is automatically installed in this directory. -
If a
node_modules
directory does not exist in your project, anode_modules
subdirectory is automatically created in the root directory of your Node.js application, and the@redhat/opossum
module is automatically installed in this subdirectory.
Additional resources
- The Red Hat customer registry is located at https://npm.registry.redhat.com.