Is it possible to have node-config resolve json refs within the local config file? #741
Replies: 2 comments
-
That sounds like a valuable feature - anyone out there that wants to implement? |
Beta Was this translation helpful? Give feedback.
-
The The other way to handle this is with some third party solution solves the issue outside of node-config and renders out a JSON file, which If there are examples of solving this purely with JSON files, please share them. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm using
node-config
with a project I'm working on and I have started using some JSON refs to reference back to some common properties in the file.Is there a way to make
node-config
work with these? Currently as well as usingnode-config
, I am using another package calledjson-refs
, which has the ability to take the whole config object (usingconfig.util.toObject()
) and return a new object with any refs resolved.Ideally, I would like this to be handled by
node-config
so I can use the dot notation as normal usingconfig.get()
.Any thoughts or ideas? Looking through the docs, there doesn't appear to be any plugin/hook system to have something run prior to retrieving the data. Unless I have overlooked something.
Thanks in advance,
D
Beta Was this translation helpful? Give feedback.
All reactions