Skip to content

Commit

Permalink
Merge pull request #1 from paul-mai/feature1
Browse files Browse the repository at this point in the history
Update main.rs
  • Loading branch information
ppardus authored Aug 18, 2023
2 parents 5299278 + 65b2f1c commit d8053a7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cstudio-server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ async fn main() {

let port = std::env::var("PORT")
.unwrap_or_else(|_| String::from("3030"))
.parse()
.expect("Unable to parse PORT");
.parse().expect("Unable to parse PORT");

let config = ServerConfig {
expiry_days: std::env::var("EXPIRY_DAYS")
.unwrap_or_else(|_| String::from("1"))
.parse()
.expect("Unable to parse EXPIRY_DAYS"),
.parse().expect("Unable to parse EXPIRY_DAYS"),
};

warp::serve(server(config)).run(([0, 0, 0, 0], port)).await;
Expand Down

0 comments on commit d8053a7

Please sign in to comment.