2018-11-26 07:13:22 +01:00
|
|
|
#[derive(Serialize, Deserialize, Debug)]
|
|
|
|
pub struct Configuration {
|
|
|
|
pub address: String,
|
|
|
|
pub threads: usize,
|
|
|
|
pub db_path: String,
|
|
|
|
pub maximum_request: usize,
|
|
|
|
// db type later
|
2019-04-18 03:28:33 +02:00
|
|
|
pub secure_cookies: bool,
|
2018-11-26 07:13:22 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
impl Configuration {
|
|
|
|
pub fn new() -> Self {
|
|
|
|
Configuration {
|
|
|
|
address: String::from("127.0.0.1:8080"),
|
|
|
|
threads: 8,
|
|
|
|
db_path: String::from(""),
|
|
|
|
maximum_request: 262144, // 256k
|
2019-04-18 03:28:33 +02:00
|
|
|
// log type
|
|
|
|
// log path
|
|
|
|
secure_cookies: true,
|
2018-11-26 07:13:22 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|