all configuration is now kept in the Config struct that has fields server: ServerConfig and database: DatabaseConfig by default which keep server (e.g. bind addr) and database (e.g. connection url) settings.
the CLIs now receive a closure for getting the configuration as in the case of the CLIs the environment is only known once the CLI arguments have been parsed since the env is passed as e.g. -e test (as opposed to e.g. as an env var)
the configuration to be used for testing is now only loaded once overall as opposed to once for every test case
the redundant Environment enum that was only used for CLI commands has been removed
the CLI commands now also handle a production environment
the seed CLI command now also accepts an env argument
This fixes a few things around config handling:
Config
struct that has fieldsserver: ServerConfig
anddatabase: DatabaseConfig
by default which keep server (e.g. bind addr) and database (e.g. connection url) settings.-e test
(as opposed to e.g. as an env var)Environment
enum that was only used for CLI commands has been removedseed
CLI command now also accepts an env argumentsee #34