Using .env config
This commit is contained in:
@@ -2,6 +2,7 @@ use std::{
|
||||
collections::HashSet,
|
||||
net::{TcpListener, TcpStream},
|
||||
path::{Path, PathBuf},
|
||||
str::FromStr,
|
||||
sync::{Arc, Mutex},
|
||||
};
|
||||
|
||||
@@ -206,3 +207,10 @@ impl Server {
|
||||
res
|
||||
}
|
||||
}
|
||||
|
||||
impl FromStr for ServerConfig {
|
||||
type Err = serde_json::Error;
|
||||
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
|
||||
serde_json::from_str(s)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user