add: PORT env var

This commit is contained in:
trisua 2025-06-22 00:04:32 -04:00
parent 52c8983634
commit 5961999ce4
9 changed files with 58 additions and 4 deletions

View file

@ -82,7 +82,11 @@ async fn main() {
.compact()
.init();
let config = config::Config::get_config();
let mut config = config::Config::get_config();
if let Ok(port) = var("PORT") {
let port = port.parse::<u16>().expect("port should be a u16");
config.port = port;
}
// init
init_dirs(&config).await;