-
Notifications
You must be signed in to change notification settings - Fork 211
env vars substitution
Illarion Kovalchuk edited this page Jul 9, 2020
·
1 revision
When configuration is loaded from file, gobetween can substitute values from environment variables into placeholders in config file. This behavior is disabled by default for security and can be enabled with command line argument:
gobetween -e
gobetween --use-config-env-vars
Env variable keys must be included in config file as ${name_of_env_var}
Example:
[servers.sample]
protocol = "tcp"
bind = "${HOST}:${PORT}"
Run with
HOST=localhost PORT=3000 gobetween -e -c example-config.toml