feature(cli,config): added custom default config
This commit is contained in:
parent
6a4aa2506d
commit
667127bbf0
1 changed files with 14 additions and 1 deletions
|
|
@ -1,7 +1,7 @@
|
|||
use lazy_static::lazy_static;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Default, Serialize, Deserialize, PartialEq, Eq)]
|
||||
#[derive(Debug, Serialize, Deserialize, PartialEq, Eq)]
|
||||
pub struct CaesarConfig {
|
||||
pub app_environment: String,
|
||||
pub app_host: String,
|
||||
|
|
@ -11,6 +11,19 @@ pub struct CaesarConfig {
|
|||
pub rust_log: String,
|
||||
}
|
||||
|
||||
impl Default for CaesarConfig {
|
||||
fn default() -> Self {
|
||||
CaesarConfig {
|
||||
app_environment: "production".to_string(),
|
||||
app_host: "0.0.0.0".to_string(),
|
||||
app_port: "8000".to_string(),
|
||||
app_origin: "wss://caesar-transfer-iu.shuttleapp.rs".to_string(),
|
||||
app_relay: "0.0.0.0:8000".to_string(),
|
||||
rust_log: "info".to_string(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lazy_static! {
|
||||
pub static ref GLOBAL_CONFIG: CaesarConfig = {
|
||||
let cfg: CaesarConfig =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue