add: PORT env var
This commit is contained in:
parent
52c8983634
commit
5961999ce4
9 changed files with 58 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue