Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Configuration File #8

Open
she3o opened this issue Nov 19, 2024 · 0 comments
Open

Add a Configuration File #8

she3o opened this issue Nov 19, 2024 · 0 comments
Labels
config enhancement New feature or request

Comments

@she3o
Copy link
Owner

she3o commented Nov 19, 2024

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
@she3o she3o added config enhancement New feature or request labels Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
config enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant