Title: aah framework Configuration Desc: The configuration syntax is used by aah framework is forge developed by @brettlangdon similar to HOCON syntax, not 100%. Enhanced by author of aah framework @jeevatkm. This config syntax used across the aah framework. Keywords: aah config, aah configuration, HOCON, forge, config syntax, configuration syntax, aah.conf, routes.conf, security.conf, aah.project
The configuration syntax is used by aah framework is forge
developed by @brettlangdon very similar to HOCON syntax and not 100%. Enhanced by author of aah framework @jeevatkm. Syntax applies to aah.conf
, routes.conf
, security.conf
, i18n
message files and aah.project
file.
- Comments
- Braces
- Supported value types
- Key-value separator
- Includes
- Environment Variables
- Substitutions/Reference
- The line starts with
#
considered as comment. - You can have same line comment after
;
. For e.g:identifier = "value"; # comment here
- Root doesn't start with curly braces.
- Section must have curly braces - values are enclosed with opening and closing brace.
String
- must be quoted stringInteger
- positive and negative value supportedFloat
- positive and negative value supportedBoolean
- true or false of any case (e.g. TRUE, True, true, FALSE, False, false)Null
- nullList/Array
- string, integer, float supported. Values are separated by commas and surrounded by brackets. It can be multi line too
- The
=
character used to separate keys from values. - The key can have
underscore
in it.
An include statement tells the config parser to include the contents of another config file where the include statement is defined. Includes are in the format include "<pattern>"
. The <pattern>
can be any glob like pattern which is compatible with path.filepath.Match. It can be absolute path or relative path to config
directory.
An environment is a way to pull in environment variables into your config. Environment variables are identifiers which start with a dollar sign (For example: $PATH
). Environment variables are always represented as strings and are evaluated at parse time. Adapted to supported value type.
Substitutions/Reference are a way of referring to other parts of the configuration into another identifier.
- Global Reference - An identifier which may contain periods, the references are resolved from the global section. For example:
global_value
,section.sub_section.value
. - Local Reference - An identifier which main contain periods which starts with a period, the references are resolved from the settings current section. For example:
.value
,.sub_section.value
.