Configuration and env variables - nimaaskarian/goje GitHub Wiki
goje can be configured by cli arguments, configuration files or env variables. cli arguments override the other two, env variables override config file options.
config file
for each cli argument, there's the exact key in the configurations (so --http-address
would become http-address
in config).
the default format is toml
, you can initialize and edit it using goje config
(which writes the current config to the default file and opens it in your $EDITOR
, or vim
on *nix, and notepad on Windows).
you can use the --config
or -c
argument to give path to a config file. you can use this option to change the config format to json
, yaml
, or an env file (and alias it to be persistent).
environment variables
for each config/cli option, there's a GOJE_*
environment variable (so --http-address
would become GOJE_HTTP_ADDRESS
in env variables).