Blueconfig v6.2.2 is a configuration schema validator and loader for Node.js, forked from node-convict v5. It merges configs from files (JSON, YAML, JSON5, TOML, XML) and environment variables, applying schema validation with custom formats and coercion. Key differentiators: supports multiple config sources, sensitive data masking, environment variable overrides, command-line argument mapping, and custom file format parsers. Release cadence is irregular; maintained by a single developer. Active development with upcoming v7 aiming to reduce dependencies.
npm install blueconfigNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a config instance from a schema, loads a JSON file, validates, and reads a value.
Upgrade to Node.js >=8 or use earlier blueconfig version.
Install 'blueconfig-format-with-validator' and register it: import 'blueconfig-format-with-validator';
Define a custom format that handles coercion.
Use environment variables and avoid logging config directly.
Run: npm install blueconfig-format-with-validator
Ensure the value is a valid integer port number, e.g., 8080.
Use: const blueconfig = require('blueconfig'); (CommonJS) or import blueconfig from 'blueconfig'; (ESM).