mirror of
https://github.com/csehviktor/status-monitor.git
synced 2026-04-28 16:27:34 +02:00
implement storage + improve code
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use rumqttd::Config;
|
||||
use serde::Deserialize;
|
||||
use rumqttd::Config;
|
||||
|
||||
const CONFIG_PATH: &str = if cfg!(debug_assertions) {
|
||||
"server/config.toml"
|
||||
@@ -7,8 +7,15 @@ const CONFIG_PATH: &str = if cfg!(debug_assertions) {
|
||||
"config.toml"
|
||||
};
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct StorageConfig {
|
||||
pub sqlite: bool,
|
||||
pub db_path: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct Configuration {
|
||||
pub storage: StorageConfig,
|
||||
pub mqtt: Config,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user