The `cloud-config-client` library provides a Node.js implementation for connecting to and consuming configuration from a Spring Cloud Config Server. Currently at version 1.6.2, it enables Node.js applications to fetch dynamic configurations, supporting application names, profiles, and labels as defined by the Spring Cloud specification. It handles property resolution based on Spring's hierarchy rules and offers a simple API for retrieving values by key, including context-based substitutions. The library provides both Promise-based and Node.js-style callback interfaces for configuration loading and ships with TypeScript types for enhanced developer experience. It differentiates itself by offering a direct, opinionated integration with the Spring Cloud Config ecosystem within Node.js environments, rather than a generic key-value store client.
npm install cloud-config-clientNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates fetching configuration asynchronously, including basic authentication, profile and label usage, context-based substitutions, and handling of self-signed certificates.
Use the 'name' parameter instead of 'application' for specifying the application name: `{ name: 'your-app-name' }`.Set `rejectUnauthorized: false` in the `client.load()` options when connecting to servers with self-signed certificates (caution: only for non-production environments).
Ensure your Node.js environment is updated to version 10 or newer.
Do not attempt to use SpEL syntax within context references; provide simple key-value pairs in the `context` option for direct string substitution.
Replace `application` with `name` in the `client.load()` options: `{ name: 'your-app-name' }`.For development/testing, set `rejectUnauthorized: false` in the `client.load()` options. For production, ensure a valid, trusted certificate is used or properly configured on the server.
Provide correct `auth` object in `client.load()` options (e.g., `{ auth: { user: 'username', pass: 'password' } }`) or embed credentials directly in the `endpoint` URL (`http://user:pass@localhost:8888`).For CommonJS: `const client = require('cloud-config-client');`. For ESM/TypeScript: `import client from 'cloud-config-client';`.No dependency data recorded yet.
No traffic data recorded yet.