@forrestjs/service-meta
v5.2.2
Published
Loads configuration from text files in _JSON_ format
Downloads
95
Readme
Service Meta
Loads configuration from text files in JSON format.
(YAML will come)
- {file_name}.{env_name}.json
- {file_name}.{suffix_name}.json
- {file_name}.json
The sourced content will be available in the App's context in a key that reflects the file name without the extension:
getContext('meta.{fileName}.key.key');
Config
meta.path
Change the source for the meta files that should be sourced.
Default: /var/lib/meta
meta.local
Change the local suffix to look for when sourcing the file.
Default: local
meta.source
List of the files to source. Use full name with extension (.json) but without suffix.
Default: []
Extensions
$META_SOURCE
const f1 = {
target: '$META_SOURCE',
handler: () => 'file_name.json',
};