config-yaml
YAML configuration for NodeJS
Basic example
config/default.yml
:
foo: "bar"list: - 1 - 2 - 3
; const config = ; console; // "bar"console; // 2
imports
directive
Example with config/production.yml
:
imports: - { resource: "default.yml" } - { resource: "routing/api.yml", property: "routing.api" } foo: "hello"tic: "tac"
; const config = ; console; // "hello"console; // Configuration from routing/api.yml
Available variables
Variable | Description |
---|---|
%__dirname% |
Directory path of the current YAML file |
%__filename% |
Current YAML file path |