2022-06-18 10:35:23 +00:00
|
|
|
//! # Configuration file
|
|
|
|
//!
|
2022-06-18 11:55:56 +00:00
|
|
|
//! Path to a config file is `config.toml` in the system configuration directory (`~/.config/homedisk/config.toml`).
|
2022-06-18 10:35:23 +00:00
|
|
|
//!
|
2022-06-21 10:51:22 +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
|
|
|
|
//! ```
|
|
|
|
//!
|
2022-06-21 10:51:22 +00:00
|
|
|
//! ### 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::*;
|