use different ports for dev and live modes
This commit is contained in:
parent
bf4c46238e
commit
398916fe10
@ -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
|
||||
}
|
@ -29,7 +29,7 @@
|
||||
"icons/icon.icns",
|
||||
"icons/icon.ico"
|
||||
],
|
||||
"identifier": "com.tauri.dev",
|
||||
"identifier": "creddy",
|
||||
"longDescription": "",
|
||||
"macOS": {
|
||||
"entitlements": null,
|
||||
@ -60,7 +60,8 @@
|
||||
"resizable": true,
|
||||
"label": "main",
|
||||
"title": "Creddy",
|
||||
"width": 800
|
||||
"width": 800,
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"systemTray": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user