feat: 添加会员订阅检查脚本 check-members.sh
This commit is contained in:
10
src/main.rs
10
src/main.rs
@@ -276,7 +276,15 @@ async fn main() -> std::io::Result<()> {
|
||||
info!("Attempting to start server...");
|
||||
|
||||
let is_production = std::env::var("APP_ENV").unwrap_or_else(|_| "development".into()) == "production";
|
||||
let ports: Vec<u16> = if is_production {
|
||||
|
||||
// 端口优先级:SERVER_PORT 环境变量 > 环境默认
|
||||
let ports: Vec<u16> = if let Ok(port_str) = std::env::var("SERVER_PORT") {
|
||||
if let Ok(port) = port_str.parse::<u16>() {
|
||||
vec![port]
|
||||
} else {
|
||||
vec![]
|
||||
}
|
||||
} else if is_production {
|
||||
vec![4433]
|
||||
} else {
|
||||
vec![8080, 3000]
|
||||
|
||||
Reference in New Issue
Block a user