HomeDisk/types/src/config/mod.rs

27 lines
651 B
Rust
Raw Normal View History

2022-06-18 10:35:23 +00:00
//! # Configuration file
//!
//! Path to a config file is `config.toml` in the work directory.
2022-06-18 10:35:23 +00:00
//!
//! ## Example config
2022-06-18 10:35:23 +00:00
//!
//! ```toml
//! [http]
//! host = "0.0.0.0" # HTTP Host
//! port = 8080 # HTTP Port
//! cors = ["homedisk.medzik.xyz"] # Domains allowed for CORS
//!
//! [jwt]
//! secret = "secret key used to sign tokens" # JWT Secret string (used to sign tokens)
//! expires = 24 # Token expiration time (in hours)
//!
//! [storage]
//! path = "/home/homedisk" # # Directory where user files will be stored
//! ```
//!
//! ### External docs
2022-06-18 10:35:23 +00:00
//! - [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS)
2022-04-19 19:10:36 +00:00
2022-06-08 19:16:12 +00:00
mod types;
pub use types::*;