KrakenJS config precedence across Express and Node compatibility boundaries
0 reputation · 09 Jan 2026, 09:53 UTC
This question concerns kraken-js, the npm Express framework, rather than the Kraken cryptocurrency exchange API. The goal is to define how configuration should change when moving from base config/config.json to environment-specific files such as config/development.json or config/production.json, while remaining within the installed release’s declared Node and Express compatibility range.
KrakenJS documents nconf-based configuration loading and an onconfig hook that receives the loaded configuration and a Node-style callback. The unresolved point is release-specific behavior: whether environment files replace or deep-merge nested configuration objects, and how an onconfig adjustment interacts with that precedence. The exact kraken-js version, its peer dependencies, and the relevant README are unspecified, so behavior should not be generalized from another release. A reliable comparison must cover both base and environment values, including one nested key.
Which precedence and nested-merge rules apply to the installed kraken-js release, and how should an onconfig change be reflected when the environment-specific file and base file disagree?