Feature Overview
Introduce a configuration file to allow users to set server options without relying solely on command-line arguments.
Requirements
- Support configuration files in TOML.
- Allow users to specify the path to the configuration file via command-line arguments or default locations.
- Give precedence to command-line inputs.
- Validate configuration file contents: Provide meaningful error messages for invalid configs.
Acceptance Criteria
- Users can create a configuration file to set server parameters like host, port, directory, logging options, backup settings, etc.
- The server correctly reads and applies settings from the configuration file.
- Documentation is provided on the configuration file structure and options.
- A default configuration file.
Implementation Suggestions
- Use crates like
config or serde to parse and manage configuration files.
- Default config locations on Linux:
/etc/zync.toml, $HOME/.zync.toml and $CONFIG/zync/config.toml
Feature Overview
Introduce a configuration file to allow users to set server options without relying solely on command-line arguments.
Requirements
Acceptance Criteria
Implementation Suggestions
configorserdeto parse and manage configuration files./etc/zync.toml,$HOME/.zync.tomland$CONFIG/zync/config.toml