use different ports for dev and live modes
This commit is contained in:
@ -10,10 +10,17 @@ pub struct AppConfig {
|
||||
|
||||
impl Default for AppConfig {
|
||||
fn default() -> Self {
|
||||
let listen_port = if cfg!(debug_assertions) {
|
||||
12_345
|
||||
}
|
||||
else {
|
||||
19_923
|
||||
};
|
||||
|
||||
AppConfig {
|
||||
db_path: get_or_create_db_path(),
|
||||
listen_addr: Ipv4Addr::LOCALHOST,
|
||||
listen_port: 19_923
|
||||
listen_port,
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -31,7 +38,7 @@ fn get_or_create_db_path() -> PathBuf {
|
||||
p
|
||||
})
|
||||
.unwrap_or(PathBuf::from("."));
|
||||
parent.push("creddy.db");
|
||||
|
||||
parent.push("creddy.db");
|
||||
parent
|
||||
}
|
Reference in New Issue
Block a user